<!DOCTYPE HTML>
<html lang="zh-CN">


<head>
    <meta charset="utf-8">
    <meta name="keywords" content="Manjaro系统配置, 博客">
    <meta name="description" content="个人学习储备知识与经验的秘密基地">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta name="renderer" content="webkit|ie-stand|ie-comp">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <!-- Global site tag (gtag.js) - Google Analytics -->

<script async src="https://www.googletagmanager.com/gtag/js?id=G-KDXT8Y4CLW"></script>
<script>
    window.dataLayer = window.dataLayer || [];
    function gtag() {
        dataLayer.push(arguments);
    }

    gtag('js', new Date());
    gtag('config', 'G-KDXT8Y4CLW');
</script>


    <title>Manjaro系统配置 | 不二博客</title>
    <link rel="icon" type="image/png" href="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/favicon.png">

    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/awesome/css/all.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/materialize/materialize.min.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/aos/aos.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/animate/animate.min.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/lightGallery/css/lightgallery.min.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/css/matery.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/css/my.css">

    <script src="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/jquery/jquery.min.js"></script>

<meta name="generator" content="Hexo 6.3.0">
<style>.github-emoji { position: relative; display: inline-block; width: 1.2em; min-height: 1.2em; overflow: hidden; vertical-align: top; color: transparent; }  .github-emoji > span { position: relative; z-index: 10; }  .github-emoji img, .github-emoji .fancybox { margin: 0 !important; padding: 0 !important; border: none !important; outline: none !important; text-decoration: none !important; user-select: none !important; cursor: auto !important; }  .github-emoji img { height: 1.2em !important; width: 1.2em !important; position: absolute !important; left: 50% !important; top: 50% !important; transform: translate(-50%, -50%) !important; user-select: none !important; cursor: auto !important; } .github-emoji-fallback { color: inherit; } .github-emoji-fallback img { opacity: 0 !important; }</style>
<link rel="alternate" href="/atom.xml" title="不二博客" type="application/atom+xml">
</head>




<body>
    <header class="navbar-fixed">
    <nav id="headNav" class="bg-color nav-transparent">
        <div id="navContainer" class="nav-wrapper container">
            <div class="brand-logo">
                <a href="/" class="waves-effect waves-light">
                    
                    <img src="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/medias/logo.png" class="logo-img" alt="LOGO">
                    
                    <span class="logo-span">不二博客</span>
                </a>
            </div>
            

<a href="#" data-target="mobile-nav" class="sidenav-trigger button-collapse"><i class="fas fa-bars"></i></a>
<ul class="right nav-menu">
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/" class="waves-effect waves-light">
      
      <i class="fas fa-home" style="zoom: 0.6;"></i>
      
      <span>首页</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/tags" class="waves-effect waves-light">
      
      <i class="fas fa-tags" style="zoom: 0.6;"></i>
      
      <span>标签</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/categories" class="waves-effect waves-light">
      
      <i class="fas fa-bookmark" style="zoom: 0.6;"></i>
      
      <span>分类</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/archives" class="waves-effect waves-light">
      
      <i class="fas fa-archive" style="zoom: 0.6;"></i>
      
      <span>归档</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/about" class="waves-effect waves-light">
      
      <i class="fas fa-user-circle" style="zoom: 0.6;"></i>
      
      <span>关于</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/contact" class="waves-effect waves-light">
      
      <i class="fas fa-comments" style="zoom: 0.6;"></i>
      
      <span>留言板</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/friends" class="waves-effect waves-light">
      
      <i class="fas fa-address-book" style="zoom: 0.6;"></i>
      
      <span>友情链接</span>
    </a>
    
  </li>
  
  <li>
    <a href="#searchModal" class="modal-trigger waves-effect waves-light">
      <i id="searchIcon" class="fas fa-search" title="搜索" style="zoom: 0.85;"></i>
    </a>
  </li>
</ul>


<div id="mobile-nav" class="side-nav sidenav">

    <div class="mobile-head bg-color">
        
        <img src="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/medias/logo.png" class="logo-img circle responsive-img">
        
        <div class="logo-name">不二博客</div>
        <div class="logo-desc">
            
            个人学习储备知识与经验的秘密基地
            
        </div>
    </div>

    

    <ul class="menu-list mobile-menu-list">
        
        <li class="m-nav-item">
	  
		<a href="/" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-home"></i>
			
			首页
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/tags" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-tags"></i>
			
			标签
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/categories" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-bookmark"></i>
			
			分类
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/archives" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-archive"></i>
			
			归档
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/about" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-user-circle"></i>
			
			关于
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/contact" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-comments"></i>
			
			留言板
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/friends" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-address-book"></i>
			
			友情链接
		</a>
          
        </li>
        
        
        <li><div class="divider"></div></li>
        <li>
            <a href="https://github.com/weiyouwozuiku" class="waves-effect waves-light" target="_blank">
                <i class="fab fa-github-square fa-fw"></i>Fork Me
            </a>
        </li>
        
    </ul>
</div>


        </div>

        
            <style>
    .nav-transparent .github-corner {
        display: none !important;
    }

    .github-corner {
        position: absolute;
        z-index: 10;
        top: 0;
        right: 0;
        border: 0;
        transform: scale(1.1);
    }

    .github-corner svg {
        color: #0f9d58;
        fill: #fff;
        height: 64px;
        width: 64px;
    }

    .github-corner:hover .octo-arm {
        animation: a 0.56s ease-in-out;
    }

    .github-corner .octo-arm {
        animation: none;
    }

    @keyframes a {
        0%,
        to {
            transform: rotate(0);
        }
        20%,
        60% {
            transform: rotate(-25deg);
        }
        40%,
        80% {
            transform: rotate(10deg);
        }
    }
</style>

<a href="https://github.com/weiyouwozuiku" class="github-corner tooltipped hide-on-med-and-down" target="_blank"
   data-tooltip="Fork Me" data-position="left" data-delay="50">
    <svg viewBox="0 0 250 250" aria-hidden="true">
        <path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
        <path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
              fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path>
        <path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"
              fill="currentColor" class="octo-body"></path>
    </svg>
</a>
        
    </nav>

</header>

    
<script src="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/cryptojs/crypto-js.min.js"></script>
<script>
    (function() {
        let pwd = '';
        if (pwd && pwd.length > 0) {
            if (pwd !== CryptoJS.SHA256(prompt('请输入访问本文章的密码')).toString(CryptoJS.enc.Hex)) {
                alert('密码错误，将返回主页！');
                location.href = '/';
            }
        }
    })();
</script>




<div class="bg-cover pd-header post-cover" style="background-image: url('https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@src/source/_posts/PageImg/经验总结/manjaro.jpg')">
    <div class="container" style="right: 0px;left: 0px;">
        <div class="row">
            <div class="col s12 m12 l12">
                <div class="brand">
                    <h1 class="description center-align post-title">Manjaro系统配置</h1>
                </div>
            </div>
        </div>
    </div>
</div>




<main class="post-container content">

    
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/tocbot/tocbot.css">
<style>
    #articleContent h1::before,
    #articleContent h2::before,
    #articleContent h3::before,
    #articleContent h4::before,
    #articleContent h5::before,
    #articleContent h6::before {
        display: block;
        content: " ";
        height: 100px;
        margin-top: -100px;
        visibility: hidden;
    }

    #articleContent :focus {
        outline: none;
    }

    .toc-fixed {
        position: fixed;
        top: 64px;
    }

    .toc-widget {
        width: 345px;
        padding-left: 20px;
    }

    .toc-widget .toc-title {
        padding: 35px 0 15px 17px;
        font-size: 1.5rem;
        font-weight: bold;
        line-height: 1.5rem;
    }

    .toc-widget ol {
        padding: 0;
        list-style: none;
    }

    #toc-content {
        padding-bottom: 30px;
        overflow: auto;
    }

    #toc-content ol {
        padding-left: 10px;
    }

    #toc-content ol li {
        padding-left: 10px;
    }

    #toc-content .toc-link:hover {
        color: #42b983;
        font-weight: 700;
        text-decoration: underline;
    }

    #toc-content .toc-link::before {
        background-color: transparent;
        max-height: 25px;

        position: absolute;
        right: 23.5vw;
        display: block;
    }

    #toc-content .is-active-link {
        color: #42b983;
    }

    #floating-toc-btn {
        position: fixed;
        right: 15px;
        bottom: 76px;
        padding-top: 15px;
        margin-bottom: 0;
        z-index: 998;
    }

    #floating-toc-btn .btn-floating {
        width: 48px;
        height: 48px;
    }

    #floating-toc-btn .btn-floating i {
        line-height: 48px;
        font-size: 1.4rem;
    }
</style>
<div class="row">
    <div id="main-content" class="col s12 m12 l9">
        <!-- 文章内容详情 -->
<div id="artDetail">
    <div class="card">
        <div class="card-content article-info">
            <div class="row tag-cate">
                <div class="col s7">
                    
                    <div class="article-tag">
                        
                            <a href="/tags/%E8%A3%85%E6%9C%BA/">
                                <span class="chip bg-color">装机</span>
                            </a>
                        
                            <a href="/tags/Ranger/">
                                <span class="chip bg-color">Ranger</span>
                            </a>
                        
                            <a href="/tags/Manjaro/">
                                <span class="chip bg-color">Manjaro</span>
                            </a>
                        
                    </div>
                    
                </div>
                <div class="col s5 right-align">
                    
                    <div class="post-cate">
                        <i class="fas fa-bookmark fa-fw icon-category"></i>
                        
                            <a href="/categories/%E7%BB%8F%E9%AA%8C%E6%80%BB%E7%BB%93/" class="post-category">
                                经验总结
                            </a>
                        
                    </div>
                    
                </div>
            </div>

            <div class="post-info">
                
                <div class="post-date info-break-policy">
                    <i class="far fa-calendar-minus fa-fw"></i>发布日期:&nbsp;&nbsp;
                    2019-12-12
                </div>
                

                
                <div class="post-date info-break-policy">
                    <i class="far fa-calendar-check fa-fw"></i>更新日期:&nbsp;&nbsp;
                    2022-01-14
                </div>
                

                
                <div class="info-break-policy">
                    <i class="far fa-file-word fa-fw"></i>文章字数:&nbsp;&nbsp;
                    12.4k
                </div>
                

                
                <div class="info-break-policy">
                    <i class="far fa-clock fa-fw"></i>阅读时长:&nbsp;&nbsp;
                    71 分
                </div>
                

                
                    <div id="busuanzi_container_page_pv" class="info-break-policy">
                        <i class="far fa-eye fa-fw"></i>阅读次数:&nbsp;&nbsp;
                        <span id="busuanzi_value_page_pv"></span>
                    </div>
				
            </div>
        </div>
        <hr class="clearfix">

        
        <!-- 是否加载使用自带的 prismjs. -->
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/prism/prism.css">
        

        
        <!-- 代码块折行 -->
        <style type="text/css">
            code[class*="language-"], pre[class*="language-"] { white-space: pre-wrap !important; }
        </style>
        

        <div class="card-content article-card-content">
            <div id="articleContent">
                <h2 id="Manjaro安装及其配置">Manjaro安装及其配置<a class="anchor" href="#Manjaro安装及其配置">¶</a></h2>
<h3 id="Win与Manjaro并存">Win与Manjaro并存<a class="anchor" href="#Win与Manjaro并存">¶</a></h3>
<p>在安装时，需要注意分配<code>/</code>和<code>/home</code>路径。将挂载点<code>/boot/efi</code>放置在windows启动盘的fat32格式的区分中。</p>
<p>若是Windows更新或其他原因导致Manjaro引导消失，请执行一下步骤：</p>
<ol>
<li>首先关闭Windows快速启动</li>
<li>用DG打开EFI分区，检查其中的文件是否有相应linux的启动引导，名称应该是<code>grubx64.efi</code>。Windows的引导文件为<code>bootmgfw.efi</code>。</li>
<li><code>win+x</code>+<code>a</code>进入管理员命令行</li>
<li>输入<code>bcdedit /set '{bootmgr}' path \EFI\Manjaro\grubx64.efi</code></li>
</ol>
<p>Win和Manjaro同时存在时会导致时间不同。原因在于电脑时间有两个:</p>
<ul>
<li>硬件时间：保存在主板中，信息少没有时区。</li>
<li>系统时间：独立于硬件时间，拥有时区、时令等信息。</li>
</ul>
<p>系统时间又因为系统不同，管理时间采用两种方法。</p>
<ul>
<li>localtime：本地时间，目前只有Windows使用。</li>
<li>UTC：是一种世界标准时间，Linux和Unix使用。UTC加减时区就是本地时间。</li>
</ul>
<p>Windows认为硬件时间就是UTC时间，而Linux会加减时区。使用<code>sudo timedatectl set-local-rtc true</code>即可。</p>
<hr>
<h3 id="软件安装">软件安装<a class="anchor" href="#软件安装">¶</a></h3>
<h4 id="Pacman安装">Pacman安装<a class="anchor" href="#Pacman安装">¶</a></h4>
<p>vim：文本软件，配合<a target="_blank" rel="noopener" href="https://github.com/chxuan/vimplus">vimplus</a>更佳（若默认编辑器不是vim可以在<code>/etc/profile</code>中添加<code>export EDITOR=/usr/bin/vim</code>）</p>
<p>yay：优秀的社区包管理工具</p>
<p>gcc和base-devel可以方便的准备C++环境</p>
<p>go：go语言包</p>
<p>nodejs：nodejs</p>
<p>npm</p>
<p>nvm</p>
<p>jq：提供json解析功能</p>
<p>wireshark：wireshark-qt，分析网络之用</p>
<p>axel：多线程下载</p>
<p>wiznote：为知笔记</p>
<p>bmon：命令行查看网络情况</p>
<p>net-tools：查看网络，安装后可以使用ifconfig</p>
<p>wps-office ttf-wps-fonts：WPS</p>
<p>latte-dock：类MacOS的应用启动器</p>
<p>unzip：解压工具</p>
<p>visual-studio-code-bin：vscode</p>
<p>v2ray qv2ray：v2ray工具链</p>
<p>baidunetworkdisk-bin：百度网盘</p>
<p>annie：A fast, simple and clean video downloader written in Go</p>
<p>arduino：Arduino prototyping platform SDK</p>
<p>Gimp：Linux中的PS</p>
<p>cloc：Count lines of code</p>
<p>cool-retro-term：A good looking terminal emulator which mimics the old cathode display</p>
<p>evtest：Input device event monitor and query tool</p>
<p>fzf：Command-line fuzzy finder</p>
<p>feh：Fast and light imlib2-based image viewer</p>
<p>telegram-desktop：Official Telegram Desktop client</p>
<p>highlight：Fast and flexible source code highlighter (CLI version)</p>
<p>iease-music：Elegant neteaseMusic desktop app, Rock with NeteaseMusic.</p>
<p>kate： Advanced Text Editor</p>
<p>ncdu：Disk usage analyzer with an ncurses interface</p>
<p>neofecth：A CLI system information tool written in BASH that supports displaying images</p>
<p>netease-cloud-music：网易云</p>
<p>netease-musicbox：网易云命令行版</p>
<p>nmap：nmap</p>
<p>postman：Build, test, and document your APIs faster</p>
<p>rclone：Sync files to and from Google Drive, S3, Swift, Cloudfiles, Dropbox and Google Cloud Storage</p>
<p>simplescreenrecorder：优秀的录屏软件</p>
<p>smplayer：播放器</p>
<p>teamviewer：远程软件</p>
<p>tig：Text-mode interface for Git.</p>
<p>translate-shell：A command-line interface and interactive shell for Google Translate</p>
<p>typora：Markdown编辑器</p>
<p>flameshot：截图工具</p>
<p>zmap：快速的互联网那个扫描仪</p>
<p>mycli：支持自动补全和语法高亮的Mysql客户端</p>
<p>kvantum-qt5：主题美化工具</p>
<p>filezilla：sftp/ftp图形化软件</p>
<p>motrix：磁力下载器</p>
<p>zathura：vim风格的pdf阅读器</p>
<p>inkscape：适量图形编辑器</p>
<p>fd：搜索软件</p>
<p>ripgrep-all：搜索软件</p>
<p>bat：预览文件程序</p>
<p>unrar：解压软件爱</p>
<p>atool</p>
<p>xdman：下载软件</p>
<p>lolcat：终端文本渐变色</p>
<p>strace:追踪进程进行时的系统调用和接收的信号</p>
<p>downgrade：指定软件版本降级</p>
<h5 id="Goldendict">Goldendict<a class="anchor" href="#Goldendict">¶</a></h5>
<p>Feature-rich dictionary lookup program</p>
<p>可以添加自己的词库</p>
<p>设置程序翻译：</p>
<ol>
<li>
<p>sudo pacman -S translate-shell</p>
</li>
<li>
<p>编辑-&gt;词典-&gt;词典来源-&gt;程序-&gt;添加</p>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup">#  Trans-2-Chinese
trans -e google -s auto -t zh-CN -show-original y -show-original-phonetics n -show-translation y -no-ansi -show-translation-phonetics n -show-prompt-message n -show-languages y -show-original-dictionary n -show-dictionary n -show-alternatives n “%GDWORD%”

# Trans-2-English
trans -e google -s auto -t en-US -show-original y -show-original-phonetics n -show-translation y -no-ansi -show-translation-phonetics n -show-prompt-message n -show-languages y -show-original-dictionary n -show-dictionary n -show-alternatives n “%GDWORD%”<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span></span></code></pre>
</li>
</ol>
<h5 id="Alacritty">Alacritty<a class="anchor" href="#Alacritty">¶</a></h5>
<p>一款GPU实时渲染的终端</p>
<p>配置文件在<code>.config/alacritty/alacritty.yml</code>。</p>
<p>可以使用<code>fc-list</code>查看已安装的字体。</p>
<p>修改如下字段：</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash">background_opacity: <span class="token number">0.7</span>
<span class="token comment"># Font configuration</span>
font:
  size: <span class="token number">11</span>  
  <span class="token comment">#Normal (roman) font face</span>
  normal:
    <span class="token comment"># Font family</span>
    <span class="token comment">#  </span>
    <span class="token comment"># Default:</span>
    <span class="token comment">#   - (macOS) Menlo</span>
    <span class="token comment">#   - (Linux/BSD) monospace</span>
    <span class="token comment">#   - (Windows) Consolas</span>
    family: JetBrainsMono Nerd Font Mono
    <span class="token comment">#family: JetBrains Mono Regular Nerd Font Complete Mono</span>
    <span class="token comment"># The `style` can be specified to pick a specific face.</span>
    style: Regular<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<h5 id="Tmux">Tmux<a class="anchor" href="#Tmux">¶</a></h5>
<p>安装<code>sudo pacman -S tmux</code></p>
<p>配置基于<a target="_blank" rel="noopener" href="https://github.com/gpakosz/.tmux">github</a></p>
<h5 id="Barrier">Barrier<a class="anchor" href="#Barrier">¶</a></h5>
<p>多台主机之间共享键鼠，使用<code>sudo pacman -S barrier</code>或<code>sudo apt install barrier</code>。</p>
<p>配置时在服务端的屏幕和联结中创建新的屏幕并设置名称，此名称需要和连接的设备的barrier中的名称一致。</p>
<h5 id="输入法">输入法<a class="anchor" href="#输入法">¶</a></h5>
<p>推荐使用<code>fcitx5</code>。搜狗输入法每次启动都会花费大量时间。</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token function">sudo</span> pacman <span class="token parameter variable">-S</span> fcitx5-im<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
<p>修改<code>~/.pam_environment</code></p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash">INPUT_METHOD  <span class="token assign-left variable">DEFAULT</span><span class="token operator">=</span>fcitx5
GTK_IM_MODULE <span class="token assign-left variable">DEFAULT</span><span class="token operator">=</span>fcitx5
QT_IM_MODULE  <span class="token assign-left variable">DEFAULT</span><span class="token operator">=</span>fcitx5
<span class="token environment constant">XMODIFIERS</span>    <span class="token assign-left variable">DEFAULT</span><span class="token operator">=</span><span class="token punctuation">\</span>@im<span class="token operator">=</span>fcitx5<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span></span></code></pre>
<p>将<code>/usr/share/applications/fcitx5.desktop</code>复制到<code>~/.config/autostart  </code>，实现开机自启。</p>
<p>添加对中文支持</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token function">sudo</span> pacman <span class="token parameter variable">-S</span> fcitx5-chinese-addons<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
<p>添加输入法模块</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token function">sudo</span> pacman <span class="token parameter variable">-S</span> fcitx5-qt fcitx5-gtk <span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
<p>添加词库</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token function">sudo</span> pacman <span class="token parameter variable">-S</span> fcitx5-pinyin-zhwiki fcitx5-pinyin-moegirl<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
<p>安装输入法皮肤</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token function">sudo</span> pacman <span class="token parameter variable">-S</span> fcitx5-material-color<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
<p>​	然后修改配置文件 <code>~/.config/fcitx5/conf/classicui.conf</code></p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token comment"># 垂直候选列表</span>
Vertical Candidate <span class="token assign-left variable">List</span><span class="token operator">=</span>False

<span class="token comment"># 按屏幕 DPI 使用</span>
<span class="token assign-left variable">PerScreenDPI</span><span class="token operator">=</span>False

<span class="token comment"># Font (设置成你喜欢的字体)</span>
<span class="token assign-left variable">Font</span><span class="token operator">=</span><span class="token string">"思源黑体 CN Medium 13"</span>

<span class="token comment"># 主题 (自定义)</span>
<span class="token assign-left variable">Theme</span><span class="token operator">=</span>Material-Color-Pink<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<p>主题名称：</p>
<ul>
<li>Material-Color-Pink</li>
<li>Material-Color-Blue</li>
<li>Material-Color-Brown</li>
<li>Material-Color-DeepPurple</li>
<li>Material-Color-Indigo</li>
<li>Material-Color-Red</li>
<li>Material-Color-Teal(不错)</li>
</ul>
<p>​	更新皮肤</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token builtin class-name">cd</span> ~/.local/share/fcitx5/themes/Material-Color
<span class="token function">git</span> pull<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span></span></code></pre>
<p>​	单行模式</p>
<ul>
<li>对于 fcitx5 自带的 pinyin，请修改 <code>~/.config/fcitx5/conf/pinyin.conf</code></li>
<li>对于 fcitx5-rime，请新建/修改 <code>~/.config/fcitx5/conf/rime.conf</code></li>
</ul>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token comment"># 可用时在应用程序中显示预编辑文本</span>
<span class="token assign-left variable">PreeditInApplication</span><span class="token operator">=</span>True<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span></span></code></pre>
<h5 id="zsh">zsh<a class="anchor" href="#zsh">¶</a></h5>
<p>终端显示，能智能的显示一些信息，高定制性。</p>
<h6 id="Oh-My-Zsh">Oh-My-Zsh<a class="anchor" href="#Oh-My-Zsh">¶</a></h6>
<p><code>sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"</code></p>
<h6 id="相应插件">相应插件<a class="anchor" href="#相应插件">¶</a></h6>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token assign-left variable">plugins</span><span class="token operator">=</span><span class="token punctuation">(</span> 
   <span class="token function">git</span> 
   z 
   extract 
   hitokoto 
   gitignore 
   <span class="token function">cp</span> 
   git-open 
   <span class="token punctuation">\</span>#safe-paste //这个软件会导致zsh的命令回溯出现问题l
   <span class="token function">sudo</span> 
   zsh-syntax-highlighting 
   zsh-autosuggestions 
   <span class="token function">history</span> 
   tmuxinator 
   tmux 
   <span class="token punctuation">)</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<p>如果相关插件提示无法使用，需要去寻找相应github仓库。将所需项目克隆至本地。</p>
<p>添加fzf设置：</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token builtin class-name">export</span> <span class="token assign-left variable">FZF_DEFAULT_COMMAND</span><span class="token operator">=</span><span class="token string">'fd --hidden --follow -E ".git" -E "node_modules" -E ".idea" . /home'</span>
<span class="token comment">#export FZF_DEFAULT_OPTS='--height 90% --layout=reverse --bind=alt-j:down,alt-k:up,alt-i:toggle+down --border --preview "[[ $(file --mime {}) =~ binary ]] &amp;&amp; echo {} is a binary file || (ccat --color=always {} || highlight -O ansi -l {} || cat {}) 2&gt; /dev/null | head -500" --preview-windows=down'</span>
<span class="token comment">#export FZF_DEFAULT_OPTS='--height 90% --layout=reverse --bind=alt-j:down,alt-k:up,alt-i:toggle+down --border  --preview "[[ $(file --mime {}) =~ binary ]] &amp;&amp; echo {} is a binary file || (ccat --color=always {} || highlight -O ansi -l {} || cat {}) 2&gt; /dev/null | head -500" --preview-window=down'</span>
<span class="token builtin class-name">export</span> <span class="token assign-left variable">FZF_DEFAULT_OPTS</span><span class="token operator">=</span><span class="token string">'--height 90% --layout=reverse --bind=alt-j:down,alt-k:up,alt-i:toggle+down --border --preview "echo {} | ~/.config/file_preview.py" --preview-window=down'</span>
<span class="token builtin class-name">export</span> <span class="token assign-left variable">FZF_COMPLETION_TRIGGER</span><span class="token operator">=</span><span class="token string">'\'</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<p><code>file_preview.py</code></p>
<pre class="line-numbers language-python" data-language="python"><code class="language-python"><span class="token comment">#!/usr/bin/env python</span>
<span class="token comment"># coding=utf-8</span>

<span class="token comment"># 在使用这个插件之前你需要先安装以下程序</span>
<span class="token comment"># 压缩文件：atool unrar unzip p7zip-full</span>
<span class="token comment"># 网页文件：w3m</span>
<span class="token comment"># 种子文件：transmission</span>
<span class="token comment"># 文本文件：bat</span>

<span class="token keyword">import</span> os
<span class="token keyword">import</span> sys


<span class="token keyword">def</span> <span class="token function">path_transfer</span><span class="token punctuation">(</span>path_input<span class="token punctuation">)</span><span class="token punctuation">:</span>
    rg_list <span class="token operator">=</span> path_input<span class="token punctuation">.</span>split<span class="token punctuation">(</span><span class="token string">':'</span><span class="token punctuation">)</span>
    <span class="token keyword">if</span> <span class="token builtin">len</span><span class="token punctuation">(</span>rg_list<span class="token punctuation">)</span> <span class="token operator">==</span> <span class="token number">1</span><span class="token punctuation">:</span>
        bat_range <span class="token operator">=</span> <span class="token number">0</span>
    <span class="token keyword">else</span><span class="token punctuation">:</span>
        bat_range <span class="token operator">=</span> rg_list<span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span><span class="token punctuation">.</span>replace<span class="token punctuation">(</span><span class="token string">'\n'</span><span class="token punctuation">,</span> <span class="token string">''</span><span class="token punctuation">)</span>
    file_path_list <span class="token operator">=</span> rg_list<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">.</span>replace<span class="token punctuation">(</span><span class="token string">'\n'</span><span class="token punctuation">,</span> <span class="token string">''</span><span class="token punctuation">)</span><span class="token punctuation">.</span>split<span class="token punctuation">(</span><span class="token string">'/'</span><span class="token punctuation">)</span>
    <span class="token keyword">for</span> i<span class="token punctuation">,</span> filep <span class="token keyword">in</span> <span class="token builtin">zip</span><span class="token punctuation">(</span><span class="token builtin">range</span><span class="token punctuation">(</span><span class="token builtin">len</span><span class="token punctuation">(</span>file_path_list<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">,</span> file_path_list<span class="token punctuation">)</span><span class="token punctuation">:</span>
        path_space <span class="token operator">=</span> filep<span class="token punctuation">.</span>find<span class="token punctuation">(</span><span class="token string">' '</span><span class="token punctuation">)</span>
        <span class="token keyword">if</span> <span class="token keyword">not</span> path_space <span class="token operator">==</span> <span class="token operator">-</span><span class="token number">1</span><span class="token punctuation">:</span>
            file_path_list<span class="token punctuation">[</span>i<span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token string">"'{}'"</span><span class="token punctuation">.</span><span class="token builtin">format</span><span class="token punctuation">(</span>filep<span class="token punctuation">)</span>
        file_path <span class="token operator">=</span> <span class="token string">'/'</span><span class="token punctuation">.</span>join<span class="token punctuation">(</span>file_path_list<span class="token punctuation">)</span>
    preview_nameandline <span class="token operator">=</span> <span class="token punctuation">[</span>file_path<span class="token punctuation">,</span> bat_range<span class="token punctuation">]</span>
    <span class="token keyword">return</span> preview_nameandline


<span class="token keyword">if</span> __name__ <span class="token operator">==</span> <span class="token string">"__main__"</span><span class="token punctuation">:</span>
    path_input <span class="token operator">=</span> sys<span class="token punctuation">.</span>stdin<span class="token punctuation">.</span>readlines<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span>
    <span class="token keyword">if</span> path_input <span class="token operator">==</span> <span class="token boolean">None</span><span class="token punctuation">:</span>
        path_input <span class="token operator">=</span> sys<span class="token punctuation">.</span>argv<span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span>
    preview_nameandline <span class="token operator">=</span> path_transfer<span class="token punctuation">(</span>path_input<span class="token punctuation">)</span>
    <span class="token keyword">if</span> os<span class="token punctuation">.</span>path<span class="token punctuation">.</span>isdir<span class="token punctuation">(</span>preview_nameandline<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
        os<span class="token punctuation">.</span>system<span class="token punctuation">(</span><span class="token string">'ls -la {}'</span><span class="token punctuation">.</span><span class="token builtin">format</span><span class="token punctuation">(</span>preview_nameandline<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
    <span class="token keyword">elif</span> preview_nameandline<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">.</span>replace<span class="token punctuation">(</span><span class="token string">"'"</span><span class="token punctuation">,</span> <span class="token string">''</span><span class="token punctuation">)</span><span class="token punctuation">.</span>endswith<span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token string">'.zip'</span><span class="token punctuation">,</span> <span class="token string">'.ZIP'</span><span class="token punctuation">,</span> <span class="token string">'.tar'</span><span class="token punctuation">,</span> <span class="token string">'.tar.gz'</span><span class="token punctuation">,</span> <span class="token string">'rar'</span><span class="token punctuation">,</span> <span class="token string">'7z'</span><span class="token punctuation">,</span> <span class="token string">'RAR'</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
        os<span class="token punctuation">.</span>system<span class="token punctuation">(</span><span class="token string">'als {}'</span><span class="token punctuation">.</span><span class="token builtin">format</span><span class="token punctuation">(</span>preview_nameandline<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
    <span class="token keyword">elif</span> preview_nameandline<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">.</span>replace<span class="token punctuation">(</span><span class="token string">"'"</span><span class="token punctuation">,</span> <span class="token string">''</span><span class="token punctuation">)</span><span class="token punctuation">.</span>endswith<span class="token punctuation">(</span><span class="token string">'.torrent'</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
        os<span class="token punctuation">.</span>system<span class="token punctuation">(</span><span class="token string">'transmission-show {}'</span><span class="token punctuation">.</span><span class="token builtin">format</span><span class="token punctuation">(</span>preview_nameandline<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
    <span class="token keyword">elif</span> preview_nameandline<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">.</span>replace<span class="token punctuation">(</span><span class="token string">"'"</span><span class="token punctuation">,</span> <span class="token string">''</span><span class="token punctuation">)</span><span class="token punctuation">.</span>endswith<span class="token punctuation">(</span><span class="token punctuation">(</span><span class="token string">'.html'</span><span class="token punctuation">,</span> <span class="token string">'.htm'</span><span class="token punctuation">,</span> <span class="token string">'.xhtml'</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
        os<span class="token punctuation">.</span>system<span class="token punctuation">(</span><span class="token string">'w3m -dump {}'</span><span class="token punctuation">.</span><span class="token builtin">format</span><span class="token punctuation">(</span>preview_nameandline<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
    <span class="token comment"># elif preview_nameandline[0].replace("'", '').endswith(('.png')):</span>
        <span class="token comment"># os.system('img2txt {}'.format(preview_nameandline[0]))</span>
    <span class="token keyword">elif</span> os<span class="token punctuation">.</span>path<span class="token punctuation">.</span>exists<span class="token punctuation">(</span>preview_nameandline<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
        os<span class="token punctuation">.</span>system<span class="token punctuation">(</span><span class="token string">'bat --style=numbers --color=always -r {}: {}'</span><span class="token punctuation">.</span><span class="token builtin">format</span><span class="token punctuation">(</span>
            preview_nameandline<span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span><span class="token punctuation">,</span> preview_nameandline<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
    <span class="token keyword">else</span><span class="token punctuation">:</span>
        os<span class="token punctuation">.</span>system<span class="token punctuation">(</span><span class="token string">'echo {}'</span><span class="token punctuation">.</span><span class="token builtin">format</span><span class="token punctuation">(</span>preview_nameandline<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<p>添加执行权限。</p>
<p>设置power10k:</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token comment"># Generated by Powerlevel10k configuration wizard on 2020-02-16 at 19:30 CST.</span>
<span class="token comment"># Based on romkatv/powerlevel10k/config/p10k-classic.zsh, checksum 02588.</span>
<span class="token comment"># Wizard options: nerdfont-complete + powerline, large icons, classic, dark, time,</span>
<span class="token comment"># angled separators, blurred heads, sharp tails, 2 lines, dotted, right frame, compact,</span>
<span class="token comment"># many icons, concise, instant_prompt=quiet.</span>
<span class="token comment"># Type `p10k configure` to generate another config.</span>
<span class="token comment">#</span>
<span class="token comment"># Config for Powerlevel10k with classic powerline prompt style. Type `p10k configure` to generate</span>
<span class="token comment"># your own config based on it.</span>
<span class="token comment">#</span>
<span class="token comment"># Tip: Looking for a nice color? Here's a one-liner to print colormap.</span>
<span class="token comment">#</span>
<span class="token comment">#   for i in {0..255}; do print -Pn "%K{$i} %k%F{$i}${(l:3::0:)i}%f " ${${(M)$((i%8)):#7}:+$'\n'}; done</span>

<span class="token comment"># Temporarily change options.</span>
<span class="token string">'builtin'</span> <span class="token string">'local'</span> <span class="token string">'-a'</span> <span class="token string">'p10k_config_opts'</span>
<span class="token punctuation">[</span><span class="token punctuation">[</span> <span class="token operator">!</span> <span class="token parameter variable">-o</span> <span class="token string">'aliases'</span>         <span class="token punctuation">]</span><span class="token punctuation">]</span> <span class="token operator">||</span> <span class="token assign-left variable">p10k_config_opts</span><span class="token operator">+=</span><span class="token punctuation">(</span><span class="token string">'aliases'</span><span class="token punctuation">)</span>
<span class="token punctuation">[</span><span class="token punctuation">[</span> <span class="token operator">!</span> <span class="token parameter variable">-o</span> <span class="token string">'sh_glob'</span>         <span class="token punctuation">]</span><span class="token punctuation">]</span> <span class="token operator">||</span> <span class="token assign-left variable">p10k_config_opts</span><span class="token operator">+=</span><span class="token punctuation">(</span><span class="token string">'sh_glob'</span><span class="token punctuation">)</span>
<span class="token punctuation">[</span><span class="token punctuation">[</span> <span class="token operator">!</span> <span class="token parameter variable">-o</span> <span class="token string">'no_brace_expand'</span> <span class="token punctuation">]</span><span class="token punctuation">]</span> <span class="token operator">||</span> <span class="token assign-left variable">p10k_config_opts</span><span class="token operator">+=</span><span class="token punctuation">(</span><span class="token string">'no_brace_expand'</span><span class="token punctuation">)</span>
<span class="token string">'builtin'</span> <span class="token string">'setopt'</span> <span class="token string">'no_aliases'</span> <span class="token string">'no_sh_glob'</span> <span class="token string">'brace_expand'</span>

<span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
  emulate <span class="token parameter variable">-L</span> <span class="token function">zsh</span>
  setopt no_unset extended_glob

  <span class="token comment"># Unset all configuration options. This allows you to apply configiguration changes without</span>
  <span class="token comment"># restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`.</span>
  <span class="token builtin class-name">unset</span> <span class="token parameter variable">-m</span> <span class="token string">'POWERLEVEL9K_*'</span>

  autoload <span class="token parameter variable">-Uz</span> is-at-least <span class="token operator">&amp;&amp;</span> is-at-least <span class="token number">5.1</span> <span class="token operator">||</span> <span class="token builtin class-name">return</span>

  zmodload zsh/langinfo
  <span class="token keyword">if</span> <span class="token punctuation">[</span><span class="token punctuation">[</span> <span class="token variable">${langinfo<span class="token punctuation">[</span>CODESET<span class="token punctuation">]</span><span class="token operator">:-</span>}</span> <span class="token operator">!=</span> <span class="token punctuation">(</span>utf<span class="token operator">|</span>UTF<span class="token punctuation">)</span><span class="token punctuation">(</span>-<span class="token operator">|</span><span class="token punctuation">)</span><span class="token number">8</span> <span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token keyword">then</span>
    <span class="token builtin class-name">local</span> <span class="token assign-left variable"><span class="token environment constant">LC_ALL</span></span><span class="token operator">=</span><span class="token variable">${${(@M)$(locale -a)<span class="token operator">:</span><span class="token operator">#</span>*.(utf|UTF)(-|)8}</span><span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span>:-en_US.UTF-8<span class="token punctuation">}</span>
  <span class="token keyword">fi</span>

  <span class="token comment"># The list of segments shown on the left. Fill it with the most important segments.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_LEFT_PROMPT_ELEMENTS</span><span class="token operator">=</span><span class="token punctuation">(</span>
    <span class="token comment"># =========================[ Line #1 ]=========================</span>
    context
    os_icon                 <span class="token comment"># os identifier</span>
    Greeting
    public_ip
    disk_usage
    <span class="token function">dir</span>                     <span class="token comment"># current directory</span>
    vcs                     <span class="token comment"># git status</span>
    <span class="token comment"># =========================[ Line #2 ]=========================</span>
    newline                 <span class="token comment"># \n</span>
    prompt_char             <span class="token comment"># prompt symbol</span>
  <span class="token punctuation">)</span>

  <span class="token comment"># The list of segments shown on the right. Fill it with less important segments.</span>
  <span class="token comment"># Right prompt on the last prompt line (where you are typing your commands) gets</span>
  <span class="token comment"># automatically hidden when the input line reaches it. Right prompt above the</span>
  <span class="token comment"># last prompt line gets hidden if it would overlap with left prompt.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS</span><span class="token operator">=</span><span class="token punctuation">(</span>
    <span class="token comment"># =========================[ Line #1 ]=========================</span>
    status                  <span class="token comment"># exit code of the last command</span>
    command_execution_time  <span class="token comment"># duration of the last command</span>
    background_jobs         <span class="token comment"># presence of background jobs</span>
    <span class="token comment">#direnv                  # direnv status (https://direnv.net/)</span>
    <span class="token comment">#asdf                    # asdf version manager (https://github.com/asdf-vm/asdf)</span>
    <span class="token comment">#virtualenv              # python virtual environment (https://docs.python.org/3/library/venv.html)</span>
    <span class="token comment">#anaconda                # conda environment (https://conda.io/)</span>
    pyenv                   <span class="token comment"># python environment (https://github.com/pyenv/pyenv)</span>
    goenv                   <span class="token comment"># go environment (https://github.com/syndbg/goenv)</span>
    nodenv                  <span class="token comment"># node.js version from nodenv (https://github.com/nodenv/nodenv)</span>
    nvm                     <span class="token comment"># node.js version from nvm (https://github.com/nvm-sh/nvm)</span>
    nodeenv                 <span class="token comment"># node.js environment (https://github.com/ekalinin/nodeenv)</span>
    node_version          <span class="token comment"># node.js version</span>
    go_version            <span class="token comment"># go version (https://golang.org)</span>
     rust_version          <span class="token comment"># rustc version (https://www.rust-lang.org)</span>
    <span class="token comment"># dotnet_version        # .NET version (https://dotnet.microsoft.com)</span>
    <span class="token comment"># php_version           # php version (https://www.php.net/)</span>
    <span class="token comment"># laravel_version       # laravel php framework version (https://laravel.com/)</span>
    <span class="token comment">#rbenv                   # ruby version from rbenv (https://github.com/rbenv/rbenv)</span>
    <span class="token comment">#rvm                     # ruby version from rvm (https://rvm.io)</span>
    <span class="token comment">#fvm                     # flutter version management (https://github.com/leoafarias/fvm)</span>
    <span class="token comment">#luaenv                  # lua version from luaenv (https://github.com/cehoffman/luaenv)</span>
    jenv                    <span class="token comment"># java version from jenv (https://github.com/jenv/jenv)</span>
    <span class="token comment">#plenv                   # perl version from plenv (https://github.com/tokuhirom/plenv)</span>
    <span class="token comment">#phpenv                  # php version from phpenv (https://github.com/phpenv/phpenv)</span>
    kubecontext             <span class="token comment"># current kubernetes context (https://kubernetes.io/)</span>
    <span class="token comment">#terraform               # terraform workspace (https://www.terraform.io)</span>
    <span class="token comment">#aws                     # aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html)</span>
    <span class="token comment">#aws_eb_env              # aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/)</span>
   <span class="token comment"># azure                   # azure account name (https://docs.microsoft.com/en-us/cli/azure)</span>
    <span class="token comment">#gcloud                  # google cloud cli account and project (https://cloud.google.com/)</span>
    <span class="token comment">#google_app_cred         # google application credentials (https://cloud.google.com/docs/authentication/production)</span>
    <span class="token comment">#context                 # user@hostname</span>
    <span class="token comment">#nordvpn                 # nordvpn connection status, linux only (https://nordvpn.com/)</span>
    ranger                  <span class="token comment"># ranger shell (https://github.com/ranger/ranger)</span>
    <span class="token comment">#nnn                     # nnn shell (https://github.com/jarun/nnn)</span>
    vim_shell               <span class="token comment"># vim shell indicator (:sh)</span>
    <span class="token comment">#midnight_commander      # midnight commander shell (https://midnight-commander.org/)</span>
    <span class="token comment">#nix_shell               # nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html)</span>
    vi_mode                 <span class="token comment"># vi mode (you don't need this if you've enabled prompt_char)</span>
    <span class="token comment"># vpn_ip                # virtual private network indicator</span>
     load                  <span class="token comment"># CPU load</span>
     disk_usage            <span class="token comment"># disk usage</span>
     <span class="token function">ram</span>                   <span class="token comment"># free RAM</span>
     swap                  <span class="token comment"># used swap</span>
    <span class="token comment">#todo                    # todo items (https://github.com/todotxt/todo.txt-cli)</span>
    timewarrior             <span class="token comment"># timewarrior tracking status (https://timewarrior.net/)</span>
    <span class="token function">time</span>                    <span class="token comment"># current time</span>
    <span class="token comment">#my_weather</span>
    <span class="token comment"># =========================[ Line #2 ]=========================</span>
    newline                 <span class="token comment"># \n</span>
     <span class="token function">ip</span>                    <span class="token comment"># ip address and bandwidth usage for a specified network interface</span>
    <span class="token comment"># public_ip             # public IP address</span>
    <span class="token comment"># proxy                 # system-wide http/https/ftp proxy</span>
     battery               <span class="token comment"># internal battery</span>
    <span class="token comment"># wifi                  # wifi speed</span>
    <span class="token comment"># example               # example user-defined segment (see prompt_example function below)</span>
  <span class="token punctuation">)</span>

  <span class="token comment"># To enable default icons for all segments, don't define POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION</span>
  <span class="token comment"># or set it to '${P9K_VISUAL_IDENTIFIER}'.</span>
  <span class="token comment">#</span>
  <span class="token comment"># To remove trailing space from all default icons, set POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION</span>
  <span class="token comment"># to '${P9K_VISUAL_IDENTIFIER% }'.</span>
  <span class="token comment">#</span>
  <span class="token comment"># To enable default icons for one segment (e.g., dir), set</span>
  <span class="token comment"># POWERLEVEL9K_DIR_VISUAL_IDENTIFIER_EXPANSION='${P9K_VISUAL_IDENTIFIER}'.</span>
  <span class="token comment">#</span>
  <span class="token comment"># To assign a specific icon to one segment (e.g., dir), set</span>
  <span class="token comment"># POWERLEVEL9K_DIR_VISUAL_IDENTIFIER_EXPANSION='⭐'.</span>
  <span class="token comment">#</span>
  <span class="token comment"># To assign a specific icon to a segment in a given state (e.g., dir in state NOT_WRITABLE),</span>
  <span class="token comment"># set POWERLEVEL9K_DIR_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐'.</span>
  <span class="token comment">#</span>
  <span class="token comment"># Note: You can use $'\u2B50' instead of '⭐'. It's especially convenient when specifying</span>
  <span class="token comment"># icons that your text editor cannot render. Don't forget to put $ and use single quotes when</span>
  <span class="token comment"># defining icons via Unicode codepoints.</span>
  <span class="token comment">#</span>
  <span class="token comment"># Note: Many default icons cannot be displayed with system fonts. You'll need to install a</span>
  <span class="token comment"># capable font to use them. See POWERLEVEL9K_MODE below.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION</span><span class="token operator">=</span><span class="token string">'${P9K_VISUAL_IDENTIFIER}'</span>

  <span class="token comment"># This option makes a difference only when default icons are enabled for all or some prompt</span>
  <span class="token comment"># segments (see POWERLEVEL9K_VISUAL_IDENTIFIER_EXPANSION above). LOCK_ICON can be printed as</span>
  <span class="token comment"># $'\uE0A2', $'\uE138' or $'\uF023' depending on POWERLEVEL9K_MODE. The correct value of this</span>
  <span class="token comment"># parameter depends on the provider of the font your terminal is using.</span>
  <span class="token comment">#</span>
  <span class="token comment">#   Font Provider                    | POWERLEVEL9K_MODE</span>
  <span class="token comment">#   ---------------------------------+-------------------</span>
  <span class="token comment">#   Powerline                        | powerline</span>
  <span class="token comment">#   Font Awesome                     | awesome-fontconfig</span>
  <span class="token comment">#   Adobe Source Code Pro            | awesome-fontconfig</span>
  <span class="token comment">#   Source Code Pro                  | awesome-fontconfig</span>
  <span class="token comment">#   Awesome-Terminal Fonts (regular) | awesome-fontconfig</span>
  <span class="token comment">#   Awesome-Terminal Fonts (patched) | awesome-patched</span>
  <span class="token comment">#   Nerd Fonts                       | nerdfont-complete</span>
  <span class="token comment">#   Other                            | compatible</span>
  <span class="token comment">#</span>
  <span class="token comment"># If this looks overwhelming, either stick with a preinstalled system font and set</span>
  <span class="token comment"># POWERLEVEL9K_MODE=compatible, or install the recommended Powerlevel10k font from</span>
  <span class="token comment"># https://github.com/romkatv/powerlevel10k/#recommended-meslo-nerd-font-patched-for-powerlevel10k</span>
  <span class="token comment"># and set POWERLEVEL9K_MODE=nerdfont-complete.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_MODE</span><span class="token operator">=</span>nerdfont-complete

  <span class="token comment"># When set to true, icons appear before content on both sides of the prompt. When set</span>
  <span class="token comment"># to false, icons go after content. If empty or not set, icons go before content in the left</span>
  <span class="token comment"># prompt and after content in the right prompt.</span>
  <span class="token comment">#</span>
  <span class="token comment"># You can also override it for a specific segment:</span>
  <span class="token comment">#</span>
  <span class="token comment">#   POWERLEVEL9K_STATUS_ICON_BEFORE_CONTENT=false</span>
  <span class="token comment">#</span>
  <span class="token comment"># Or for a specific segment in specific state:</span>
  <span class="token comment">#</span>
  <span class="token comment">#   POWERLEVEL9K_DIR_NOT_WRITABLE_ICON_BEFORE_CONTENT=false</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_ICON_BEFORE_CONTENT</span><span class="token operator">=</span>

  <span class="token comment"># Add an empty line before each prompt.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_PROMPT_ADD_NEWLINE</span><span class="token operator">=</span>false

  <span class="token comment"># Connect left prompt lines with these symbols. You'll probably want to use the same color</span>
  <span class="token comment"># as POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND below.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX</span><span class="token operator">=</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_PREFIX</span><span class="token operator">=</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX</span><span class="token operator">=</span>
  <span class="token comment"># Connect right prompt lines with these symbols.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_MULTILINE_FIRST_PROMPT_SUFFIX</span><span class="token operator">=</span><span class="token string">'%240F─╮'</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_MULTILINE_NEWLINE_PROMPT_SUFFIX</span><span class="token operator">=</span><span class="token string">'%240F─┤'</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_MULTILINE_LAST_PROMPT_SUFFIX</span><span class="token operator">=</span><span class="token string">'%240F─╯'</span>

  <span class="token comment"># Filler between left and right prompt on the first prompt line. You can set it to ' ', '·' or</span>
  <span class="token comment"># '─'. The last two make it easier to see the alignment between left and right prompt and to</span>
  <span class="token comment"># separate prompt from command output. You might want to set POWERLEVEL9K_PROMPT_ADD_NEWLINE=false</span>
  <span class="token comment"># for more compact prompt if using using this option.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR</span><span class="token operator">=</span><span class="token string">'·'</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_BACKGROUND</span><span class="token operator">=</span>
  <span class="token keyword">if</span> <span class="token punctuation">[</span><span class="token punctuation">[</span> <span class="token variable">$POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_CHAR</span> <span class="token operator">!=</span> <span class="token string">' '</span> <span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token keyword">then</span>
    <span class="token comment"># The color of the filler. You'll probably want to match the color of POWERLEVEL9K_MULTILINE</span>
    <span class="token comment"># ornaments defined above.</span>
    <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_MULTILINE_FIRST_PROMPT_GAP_FOREGROUND</span><span class="token operator">=</span><span class="token number">240</span>
    <span class="token comment"># Start filler from the edge of the screen if there are no left segments on the first line.</span>
    <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_FIRST_SEGMENT_END_SYMBOL</span><span class="token operator">=</span><span class="token string">'%{%}'</span>
    <span class="token comment"># End filler on the edge of the screen if there are no right segments on the first line.</span>
    <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_EMPTY_LINE_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL</span><span class="token operator">=</span><span class="token string">'%{%}'</span>
  <span class="token keyword">fi</span>

  <span class="token comment"># Default background color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_BACKGROUND</span><span class="token operator">=</span><span class="token number">236</span>

  <span class="token comment"># Separator between same-color segments on the left.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_LEFT_SUBSEGMENT_SEPARATOR</span><span class="token operator">=</span><span class="token string">'%244F\uE0B1'</span>
  <span class="token comment"># Separator between same-color segments on the right.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_RIGHT_SUBSEGMENT_SEPARATOR</span><span class="token operator">=</span><span class="token string">'%244F\uE0B3'</span>
  <span class="token comment"># Separator between different-color segments on the left.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR</span><span class="token operator">=</span><span class="token string">'\uE0B0'</span>
  <span class="token comment"># Separator between different-color segments on the right.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR</span><span class="token operator">=</span><span class="token string">'\uE0B2'</span>
  <span class="token comment"># The right end of left prompt.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL</span><span class="token operator">=</span><span class="token string">'▓▒░'</span>
  <span class="token comment"># The left end of right prompt.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_RIGHT_PROMPT_FIRST_SEGMENT_START_SYMBOL</span><span class="token operator">=</span><span class="token string">'░▒▓'</span>
  <span class="token comment"># The left end of left prompt.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL</span><span class="token operator">=</span><span class="token string">'\uE0B2'</span>
  <span class="token comment"># The right end of right prompt.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_RIGHT_PROMPT_LAST_SEGMENT_END_SYMBOL</span><span class="token operator">=</span><span class="token string">'\uE0B0'</span>
  <span class="token comment"># Left prompt terminator for lines without any segments.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_EMPTY_LINE_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL</span><span class="token operator">=</span>

  <span class="token comment">#################################[ os_icon: os identifier ]##################################</span>
  <span class="token comment"># OS identifier color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_OS_ICON_FOREGROUND</span><span class="token operator">=</span><span class="token number">255</span>
  <span class="token comment"># Make the icon bold.</span>
  <span class="token comment">#typeset -g POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION='%B${P9K_CONTENT}'</span>
  <span class="token comment"># 修改显示的系统图标为Arch</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_OS_ICON_CONTENT_EXPANSION</span><span class="token operator">=</span>%B<span class="token string">$'<span class="token entity" title="\uF303">\uF303</span> '</span>
  
  <span class="token comment">################################[ prompt_char: prompt symbol ]################################</span>
  <span class="token comment"># Transparent background.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_PROMPT_CHAR_BACKGROUND</span><span class="token operator">=</span>
  <span class="token comment"># Green prompt symbol if the last command succeeded.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> POWERLEVEL9K_PROMPT_CHAR_OK_<span class="token punctuation">{</span>VIINS,VICMD,VIVIS,VIOWR<span class="token punctuation">}</span>_FOREGROUND<span class="token operator">=</span><span class="token number">76</span>
  <span class="token comment"># Red prompt symbol if the last command failed.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> POWERLEVEL9K_PROMPT_CHAR_ERROR_<span class="token punctuation">{</span>VIINS,VICMD,VIVIS,VIOWR<span class="token punctuation">}</span>_FOREGROUND<span class="token operator">=</span><span class="token number">196</span>
  <span class="token comment"># Default prompt symbol.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> POWERLEVEL9K_PROMPT_CHAR_<span class="token punctuation">{</span>OK,ERROR<span class="token punctuation">}</span>_VIINS_CONTENT_EXPANSION<span class="token operator">=</span><span class="token string">'❯'</span>
  <span class="token comment"># Prompt symbol in command vi mode.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> POWERLEVEL9K_PROMPT_CHAR_<span class="token punctuation">{</span>OK,ERROR<span class="token punctuation">}</span>_VICMD_CONTENT_EXPANSION<span class="token operator">=</span><span class="token string">'❮'</span>
  <span class="token comment"># Prompt symbol in visual vi mode.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> POWERLEVEL9K_PROMPT_CHAR_<span class="token punctuation">{</span>OK,ERROR<span class="token punctuation">}</span>_VIVIS_CONTENT_EXPANSION<span class="token operator">=</span><span class="token string">'Ⅴ'</span>
  <span class="token comment"># Prompt symbol in overwrite vi mode.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> POWERLEVEL9K_PROMPT_CHAR_<span class="token punctuation">{</span>OK,ERROR<span class="token punctuation">}</span>_VIOWR_CONTENT_EXPANSION<span class="token operator">=</span><span class="token string">'▶'</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_PROMPT_CHAR_OVERWRITE_STATE</span><span class="token operator">=</span>true
  <span class="token comment"># No line terminator if prompt_char is the last segment.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_LAST_SEGMENT_END_SYMBOL</span><span class="token operator">=</span>
  <span class="token comment"># No line introducer if prompt_char is the first segment.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_PROMPT_CHAR_LEFT_PROMPT_FIRST_SEGMENT_START_SYMBOL</span><span class="token operator">=</span>
  <span class="token comment"># No surrounding whitespace.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> POWERLEVEL9K_PROMPT_CHAR_LEFT_<span class="token punctuation">{</span>LEFT,RIGHT<span class="token punctuation">}</span>_WHITESPACE<span class="token operator">=</span>

  <span class="token comment">##################################[ dir: current directory ]##################################</span>
  <span class="token comment"># Default current directory color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_DIR_FOREGROUND</span><span class="token operator">=</span><span class="token number">31</span>
  <span class="token comment"># If directory is too long, shorten some of its segments to the shortest possible unique</span>
  <span class="token comment"># prefix. The shortened directory can be tab-completed to the original.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_SHORTEN_STRATEGY</span><span class="token operator">=</span>truncate_to_unique
  <span class="token comment"># Replace removed segment suffixes with this symbol.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_SHORTEN_DELIMITER</span><span class="token operator">=</span>
  <span class="token comment"># Color of the shortened directory segments.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_DIR_SHORTENED_FOREGROUND</span><span class="token operator">=</span><span class="token number">103</span>
  <span class="token comment"># Color of the anchor directory segments. Anchor segments are never shortened. The first</span>
  <span class="token comment"># segment is always an anchor.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_DIR_ANCHOR_FOREGROUND</span><span class="token operator">=</span><span class="token number">39</span>
  <span class="token comment"># Display anchor directory segments in bold.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_DIR_ANCHOR_BOLD</span><span class="token operator">=</span>true
  <span class="token comment"># Don't shorten directories that contain any of these files. They are anchors.</span>
  <span class="token builtin class-name">local</span> <span class="token assign-left variable">anchor_files</span><span class="token operator">=</span><span class="token punctuation">(</span>
    .bzr
    .citc
    .git
    .hg
    .node-version
    .python-version
    .go-version
    .ruby-version
    .lua-version
    .java-version
    .perl-version
    .php-version
    .tool-version
    .shorten_folder_marker
    .svn
    .terraform
    CVS
    Cargo.toml
    composer.json
    go.mod
    package.json
  <span class="token punctuation">)</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_SHORTEN_FOLDER_MARKER</span><span class="token operator">=</span><span class="token string">"(<span class="token variable">${(j<span class="token operator">:</span>|<span class="token operator">:</span>)anchor_files}</span>)"</span>
  <span class="token comment"># If set to true, remove everything before the last (deepest) subdirectory that contains files</span>
  <span class="token comment"># matching $POWERLEVEL9K_SHORTEN_FOLDER_MARKER. For example, when the current directory is</span>
  <span class="token comment"># /foo/bar/git_repo/baz, prompt will display git_repo/baz. This assumes that /foo/bar/git_repo</span>
  <span class="token comment"># contains a marker (.git) and other directories don't.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_DIR_TRUNCATE_BEFORE_MARKER</span><span class="token operator">=</span>false
  <span class="token comment"># Don't shorten this many last directory segments. They are anchors.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_SHORTEN_DIR_LENGTH</span><span class="token operator">=</span><span class="token number">1</span>
  <span class="token comment"># Shorten directory if it's longer than this even if there is space for it. The value can</span>
  <span class="token comment"># be either absolute (e.g., '80') or a percentage of terminal width (e.g, '50%'). If empty,</span>
  <span class="token comment"># directory will be shortened only when prompt doesn't fit or when other parameters demand it</span>
  <span class="token comment"># (see POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS and POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT below).</span>
  <span class="token comment"># If set to `0`, directory will always be shortened to its minimum length.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_DIR_MAX_LENGTH</span><span class="token operator">=</span><span class="token number">80</span>
  <span class="token comment"># When `dir` segment is on the last prompt line, try to shorten it enough to leave at least this</span>
  <span class="token comment"># many columns for typing commands.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS</span><span class="token operator">=</span><span class="token number">40</span>
  <span class="token comment"># When `dir` segment is on the last prompt line, try to shorten it enough to leave at least</span>
  <span class="token comment"># COLUMNS * POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT * 0.01 columns for typing commands.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_DIR_MIN_COMMAND_COLUMNS_PCT</span><span class="token operator">=</span><span class="token number">50</span>
  <span class="token comment"># If set to true, embed a hyperlink into the directory. Useful for quickly</span>
  <span class="token comment"># opening a directory in the file manager simply by clicking the link.</span>
  <span class="token comment"># Can also be handy when the directory is shortened, as it allows you to see</span>
  <span class="token comment"># the full directory that was used in previous commands.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_DIR_HYPERLINK</span><span class="token operator">=</span>false

  <span class="token comment"># Enable special styling for non-writable directories.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_DIR_SHOW_WRITABLE</span><span class="token operator">=</span>true
  <span class="token comment"># Show this icon when the current directory is not writable. POWERLEVEL9K_DIR_SHOW_WRITABLE</span>
  <span class="token comment"># above must be set to true for this parameter to have effect.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_DIR_NOT_WRITABLE_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment"># Custom prefix.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_DIR_PREFIX='%246Fin '</span>

  <span class="token comment"># POWERLEVEL9K_DIR_CLASSES allows you to specify custom icons for different directories.</span>
  <span class="token comment"># It must be an array with 3 * N elements. Each triplet consists of:</span>
  <span class="token comment">#</span>
  <span class="token comment">#   1. A pattern against which the current directory is matched. Matching is done with</span>
  <span class="token comment">#      extended_glob option enabled.</span>
  <span class="token comment">#   2. Directory class for the purpose of styling.</span>
  <span class="token comment">#   3. Icon.</span>
  <span class="token comment">#</span>
  <span class="token comment"># Triplets are tried in order. The first triplet whose pattern matches $PWD wins. If there</span>
  <span class="token comment"># are no matches, the directory will have no icon.</span>
  <span class="token comment">#</span>
  <span class="token comment"># Example:</span>
  <span class="token comment">#</span>
  <span class="token comment">#   typeset -g POWERLEVEL9K_DIR_CLASSES=(</span>
  <span class="token comment">#       '~/work(|/*)'  WORK     '(╯°□°）╯︵ ┻━┻'</span>
  <span class="token comment">#       '~(|/*)'       HOME     '⌂'</span>
  <span class="token comment">#       '*'            DEFAULT  '')</span>
  <span class="token comment">#</span>
  <span class="token comment"># With these settings, the current directory in the prompt may look like this:</span>
  <span class="token comment">#</span>
  <span class="token comment">#   (╯°□°）╯︵ ┻━┻ ~/work/projects/important/urgent</span>
  <span class="token comment">#</span>
  <span class="token comment"># Or like this:</span>
  <span class="token comment">#</span>
  <span class="token comment">#   ⌂ ~/best/powerlevel10k</span>
  <span class="token comment">#</span>
  <span class="token comment"># You can also set different colors for directories of different classes. Remember to override</span>
  <span class="token comment"># FOREGROUND, SHORTENED_FOREGROUND and ANCHOR_FOREGROUND for every directory class that you wish</span>
  <span class="token comment"># to have its own color.</span>
  <span class="token comment">#</span>
  <span class="token comment">#   typeset -g POWERLEVEL9K_DIR_WORK_FOREGROUND=31</span>
  <span class="token comment">#   typeset -g POWERLEVEL9K_DIR_WORK_SHORTENED_FOREGROUND=103</span>
  <span class="token comment">#   typeset -g POWERLEVEL9K_DIR_WORK_ANCHOR_FOREGROUND=39</span>
  <span class="token comment">#</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_DIR_CLASSES=()</span>

  <span class="token comment">#####################################[ vcs: git status ]######################################</span>
  <span class="token comment"># Branch icon. Set this parameter to '\uF126 ' for the popular Powerline branch icon.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VCS_BRANCH_ICON</span><span class="token operator">=</span><span class="token string">'\uF126 '</span>
  <span class="token assign-left variable">POWERLEVEL9K_VCS_BRANCH_ICON</span><span class="token operator">=</span><span class="token variable">${(g<span class="token operator">:</span><span class="token operator">:</span>)POWERLEVEL9K_VCS_BRANCH_ICON}</span>

  <span class="token comment"># Untracked files icon. It's really a question mark, your font isn't broken.</span>
  <span class="token comment"># Change the value of this parameter to show a different icon.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VCS_UNTRACKED_ICON</span><span class="token operator">=</span><span class="token string">'?'</span>
  <span class="token assign-left variable">POWERLEVEL9K_VCS_UNTRACKED_ICON</span><span class="token operator">=</span><span class="token variable">${(g<span class="token operator">:</span><span class="token operator">:</span>)POWERLEVEL9K_VCS_UNTRACKED_ICON}</span>

  <span class="token comment"># Formatter for Git status.</span>
  <span class="token comment">#</span>
  <span class="token comment"># Example output: master ⇣42⇡42 *42 merge ~42 +42 !42 ?42.</span>
  <span class="token comment">#</span>
  <span class="token comment"># You can edit the function to customize how Git status looks.</span>
  <span class="token comment">#</span>
  <span class="token comment"># VCS_STATUS_* parameters are set by gitstatus plugin. See reference:</span>
  <span class="token comment"># https://github.com/romkatv/gitstatus/blob/master/gitstatus.plugin.zsh.</span>
  <span class="token keyword">function</span> <span class="token function-name function">my_git_formatter</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    emulate <span class="token parameter variable">-L</span> <span class="token function">zsh</span>

    <span class="token keyword">if</span> <span class="token punctuation">[</span><span class="token punctuation">[</span> <span class="token parameter variable">-n</span> <span class="token variable">$P9K_CONTENT</span> <span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token keyword">then</span>
      <span class="token comment"># If P9K_CONTENT is not empty, use it. It's either "loading" or from vcs_info (not from</span>
      <span class="token comment"># gitstatus plugin). VCS_STATUS_* parameters are not available in this case.</span>
      <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">my_git_format</span><span class="token operator">=</span><span class="token variable">$P9K_CONTENT</span>
      <span class="token builtin class-name">return</span>
    <span class="token keyword">fi</span>

    <span class="token keyword">if</span> <span class="token variable"><span class="token punctuation">((</span> $<span class="token number">1</span> <span class="token punctuation">))</span></span><span class="token punctuation">;</span> <span class="token keyword">then</span>
      <span class="token comment"># Styling for up-to-date Git status.</span>
      <span class="token builtin class-name">local</span>       <span class="token assign-left variable">meta</span><span class="token operator">=</span><span class="token string">'%246F'</span>  <span class="token comment"># grey foreground</span>
      <span class="token builtin class-name">local</span>      <span class="token assign-left variable">clean</span><span class="token operator">=</span><span class="token string">'%76F'</span>   <span class="token comment"># green foreground</span>
      <span class="token builtin class-name">local</span>   <span class="token assign-left variable">modified</span><span class="token operator">=</span><span class="token string">'%178F'</span>  <span class="token comment"># yellow foreground</span>
      <span class="token builtin class-name">local</span>  <span class="token assign-left variable">untracked</span><span class="token operator">=</span><span class="token string">'%39F'</span>   <span class="token comment"># blue foreground</span>
      <span class="token builtin class-name">local</span> <span class="token assign-left variable">conflicted</span><span class="token operator">=</span><span class="token string">'%196F'</span>  <span class="token comment"># red foreground</span>
    <span class="token keyword">else</span>
      <span class="token comment"># Styling for incomplete and stale Git status.</span>
      <span class="token builtin class-name">local</span>       <span class="token assign-left variable">meta</span><span class="token operator">=</span><span class="token string">'%244F'</span>  <span class="token comment"># grey foreground</span>
      <span class="token builtin class-name">local</span>      <span class="token assign-left variable">clean</span><span class="token operator">=</span><span class="token string">'%244F'</span>  <span class="token comment"># grey foreground</span>
      <span class="token builtin class-name">local</span>   <span class="token assign-left variable">modified</span><span class="token operator">=</span><span class="token string">'%244F'</span>  <span class="token comment"># grey foreground</span>
      <span class="token builtin class-name">local</span>  <span class="token assign-left variable">untracked</span><span class="token operator">=</span><span class="token string">'%244F'</span>  <span class="token comment"># grey foreground</span>
      <span class="token builtin class-name">local</span> <span class="token assign-left variable">conflicted</span><span class="token operator">=</span><span class="token string">'%244F'</span>  <span class="token comment"># grey foreground</span>
    <span class="token keyword">fi</span>

    <span class="token builtin class-name">local</span> res
    <span class="token builtin class-name">local</span> where  <span class="token comment"># branch or tag</span>
    <span class="token keyword">if</span> <span class="token punctuation">[</span><span class="token punctuation">[</span> <span class="token parameter variable">-n</span> <span class="token variable">$VCS_STATUS_LOCAL_BRANCH</span> <span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token keyword">then</span>
      <span class="token assign-left variable">res</span><span class="token operator">+=</span><span class="token string">"<span class="token variable">${clean}</span><span class="token variable">${POWERLEVEL9K_VCS_BRANCH_ICON}</span>"</span>
      <span class="token assign-left variable">where</span><span class="token operator">=</span><span class="token variable">${(V)VCS_STATUS_LOCAL_BRANCH}</span>
    <span class="token keyword">elif</span> <span class="token punctuation">[</span><span class="token punctuation">[</span> <span class="token parameter variable">-n</span> <span class="token variable">$VCS_STATUS_TAG</span> <span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token keyword">then</span>
      <span class="token assign-left variable">res</span><span class="token operator">+=</span><span class="token string">"<span class="token variable">${meta}</span>#"</span>
      <span class="token assign-left variable">where</span><span class="token operator">=</span><span class="token variable">${(V)VCS_STATUS_TAG}</span>
    <span class="token keyword">fi</span>

    <span class="token comment"># If local branch name or tag is at most 32 characters long, show it in full.</span>
    <span class="token comment"># Otherwise show the first 12 … the last 12.</span>
    <span class="token variable"><span class="token punctuation">((</span> $#where <span class="token operator">&gt;</span> <span class="token number">32</span> <span class="token punctuation">))</span></span> <span class="token operator">&amp;&amp;</span> where<span class="token punctuation">[</span><span class="token number">13</span>,-13<span class="token punctuation">]</span><span class="token operator">=</span><span class="token string">"…"</span>
    <span class="token assign-left variable">res</span><span class="token operator">+=</span><span class="token string">"<span class="token variable">${clean}</span><span class="token variable">${where<span class="token operator">/</span><span class="token operator">/</span>\<span class="token operator">%</span><span class="token operator">/</span><span class="token operator">%%</span>}</span>"</span>  <span class="token comment"># escape %</span>

    <span class="token comment"># Display the current Git commit if there is no branch or tag.</span>
    <span class="token comment"># Tip: To always display the current Git commit, remove `[[ -z $where ]] &amp;&amp;` from the next line.</span>
    <span class="token punctuation">[</span><span class="token punctuation">[</span> <span class="token parameter variable">-z</span> <span class="token variable">$where</span> <span class="token punctuation">]</span><span class="token punctuation">]</span> <span class="token operator">&amp;&amp;</span> <span class="token assign-left variable">res</span><span class="token operator">+=</span><span class="token string">"<span class="token variable">${meta}</span>@<span class="token variable">${clean}</span><span class="token variable">${VCS_STATUS_COMMIT<span class="token punctuation">[</span>1<span class="token operator">,</span>8<span class="token punctuation">]</span>}</span>"</span>

    <span class="token comment"># Show tracking branch name if it differs from local branch.</span>
    <span class="token keyword">if</span> <span class="token punctuation">[</span><span class="token punctuation">[</span> <span class="token parameter variable">-n</span> <span class="token variable">${VCS_STATUS_REMOTE_BRANCH<span class="token operator">:</span><span class="token operator">#</span>$VCS_STATUS_LOCAL_BRANCH}</span> <span class="token punctuation">]</span><span class="token punctuation">]</span><span class="token punctuation">;</span> <span class="token keyword">then</span>
      <span class="token assign-left variable">res</span><span class="token operator">+=</span><span class="token string">"<span class="token variable">${meta}</span>:<span class="token variable">${clean}</span><span class="token variable">${(V)VCS_STATUS_REMOTE_BRANCH<span class="token operator">/</span><span class="token operator">/</span>\<span class="token operator">%</span><span class="token operator">/</span><span class="token operator">%%</span>}</span>"</span>  <span class="token comment"># escape %</span>
    <span class="token keyword">fi</span>

    <span class="token comment"># ⇣42 if behind the remote.</span>
    <span class="token variable"><span class="token punctuation">((</span> VCS_STATUS_COMMITS_BEHIND <span class="token punctuation">))</span></span> <span class="token operator">&amp;&amp;</span> <span class="token assign-left variable">res</span><span class="token operator">+=</span><span class="token string">" <span class="token variable">${clean}</span>⇣<span class="token variable">${VCS_STATUS_COMMITS_BEHIND}</span>"</span>
    <span class="token comment"># ⇡42 if ahead of the remote; no leading space if also behind the remote: ⇣42⇡42.</span>
    <span class="token variable"><span class="token punctuation">((</span> VCS_STATUS_COMMITS_AHEAD <span class="token operator">&amp;&amp;</span> <span class="token operator">!</span>VCS_STATUS_COMMITS_BEHIND <span class="token punctuation">))</span></span> <span class="token operator">&amp;&amp;</span> <span class="token assign-left variable">res</span><span class="token operator">+=</span><span class="token string">" "</span>
    <span class="token variable"><span class="token punctuation">((</span> VCS_STATUS_COMMITS_AHEAD  <span class="token punctuation">))</span></span> <span class="token operator">&amp;&amp;</span> <span class="token assign-left variable">res</span><span class="token operator">+=</span><span class="token string">"<span class="token variable">${clean}</span>⇡<span class="token variable">${VCS_STATUS_COMMITS_AHEAD}</span>"</span>
    <span class="token comment"># ⇠42 if behind the push remote.</span>
    <span class="token variable"><span class="token punctuation">((</span> VCS_STATUS_PUSH_COMMITS_BEHIND <span class="token punctuation">))</span></span> <span class="token operator">&amp;&amp;</span> <span class="token assign-left variable">res</span><span class="token operator">+=</span><span class="token string">" <span class="token variable">${clean}</span>⇠<span class="token variable">${VCS_STATUS_PUSH_COMMITS_BEHIND}</span>"</span>
    <span class="token variable"><span class="token punctuation">((</span> VCS_STATUS_PUSH_COMMITS_AHEAD <span class="token operator">&amp;&amp;</span> <span class="token operator">!</span>VCS_STATUS_PUSH_COMMITS_BEHIND <span class="token punctuation">))</span></span> <span class="token operator">&amp;&amp;</span> <span class="token assign-left variable">res</span><span class="token operator">+=</span><span class="token string">" "</span>
    <span class="token comment"># ⇢42 if ahead of the push remote; no leading space if also behind: ⇠42⇢42.</span>
    <span class="token variable"><span class="token punctuation">((</span> VCS_STATUS_PUSH_COMMITS_AHEAD  <span class="token punctuation">))</span></span> <span class="token operator">&amp;&amp;</span> <span class="token assign-left variable">res</span><span class="token operator">+=</span><span class="token string">"<span class="token variable">${clean}</span>⇢<span class="token variable">${VCS_STATUS_PUSH_COMMITS_AHEAD}</span>"</span>
    <span class="token comment"># *42 if have stashes.</span>
    <span class="token variable"><span class="token punctuation">((</span> VCS_STATUS_STASHES        <span class="token punctuation">))</span></span> <span class="token operator">&amp;&amp;</span> <span class="token assign-left variable">res</span><span class="token operator">+=</span><span class="token string">" <span class="token variable">${clean}</span>*<span class="token variable">${VCS_STATUS_STASHES}</span>"</span>
    <span class="token comment"># 'merge' if the repo is in an unusual state.</span>
    <span class="token punctuation">[</span><span class="token punctuation">[</span> <span class="token parameter variable">-n</span> <span class="token variable">$VCS_STATUS_ACTION</span>     <span class="token punctuation">]</span><span class="token punctuation">]</span> <span class="token operator">&amp;&amp;</span> <span class="token assign-left variable">res</span><span class="token operator">+=</span><span class="token string">" <span class="token variable">${conflicted}</span><span class="token variable">${VCS_STATUS_ACTION}</span>"</span>
    <span class="token comment"># ~42 if have merge conflicts.</span>
    <span class="token variable"><span class="token punctuation">((</span> VCS_STATUS_NUM_CONFLICTED <span class="token punctuation">))</span></span> <span class="token operator">&amp;&amp;</span> <span class="token assign-left variable">res</span><span class="token operator">+=</span><span class="token string">" <span class="token variable">${conflicted}</span>~<span class="token variable">${VCS_STATUS_NUM_CONFLICTED}</span>"</span>
    <span class="token comment"># +42 if have staged changes.</span>
    <span class="token variable"><span class="token punctuation">((</span> VCS_STATUS_NUM_STAGED     <span class="token punctuation">))</span></span> <span class="token operator">&amp;&amp;</span> <span class="token assign-left variable">res</span><span class="token operator">+=</span><span class="token string">" <span class="token variable">${modified}</span>+<span class="token variable">${VCS_STATUS_NUM_STAGED}</span>"</span>
    <span class="token comment"># !42 if have unstaged changes.</span>
    <span class="token variable"><span class="token punctuation">((</span> VCS_STATUS_NUM_UNSTAGED   <span class="token punctuation">))</span></span> <span class="token operator">&amp;&amp;</span> <span class="token assign-left variable">res</span><span class="token operator">+=</span><span class="token string">" <span class="token variable">${modified}</span>!<span class="token variable">${VCS_STATUS_NUM_UNSTAGED}</span>"</span>
    <span class="token comment"># ?42 if have untracked files. It's really a question mark, your font isn't broken.</span>
    <span class="token comment"># See POWERLEVEL9K_VCS_UNTRACKED_ICON above if you want to use a different icon.</span>
    <span class="token comment"># Remove the next line if you don't want to see untracked files at all.</span>
    <span class="token variable"><span class="token punctuation">((</span> VCS_STATUS_NUM_UNTRACKED  <span class="token punctuation">))</span></span> <span class="token operator">&amp;&amp;</span> <span class="token assign-left variable">res</span><span class="token operator">+=</span><span class="token string">" <span class="token variable">${untracked}</span><span class="token variable">${POWERLEVEL9K_VCS_UNTRACKED_ICON}</span><span class="token variable">${VCS_STATUS_NUM_UNTRACKED}</span>"</span>
    <span class="token comment"># "─" if the number of unstaged files is unknown. This can happen due to</span>
    <span class="token comment"># POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY (see below) being set to a non-negative number lower</span>
    <span class="token comment"># than the number of files in the Git index, or due to bash.showDirtyState being set to false</span>
    <span class="token comment"># in the repository config. The number of staged and untracked files may also be unknown</span>
    <span class="token comment"># in this case.</span>
    <span class="token variable"><span class="token punctuation">((</span> VCS_STATUS_HAS_UNSTAGED <span class="token operator">==</span> <span class="token operator">-</span><span class="token number">1</span> <span class="token punctuation">))</span></span> <span class="token operator">&amp;&amp;</span> <span class="token assign-left variable">res</span><span class="token operator">+=</span><span class="token string">" <span class="token variable">${modified}</span>─"</span>

    <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">my_git_format</span><span class="token operator">=</span><span class="token variable">$res</span>
  <span class="token punctuation">}</span>
  functions <span class="token parameter variable">-M</span> my_git_formatter <span class="token operator"><span class="token file-descriptor important">2</span>&gt;</span>/dev/null

  <span class="token comment"># Don't count the number of unstaged, untracked and conflicted files in Git repositories with</span>
  <span class="token comment"># more than this many files in the index. Negative value means infinity.</span>
  <span class="token comment">#</span>
  <span class="token comment"># If you are working in Git repositories with tens of millions of files and seeing performance</span>
  <span class="token comment"># sagging, try setting POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY to a number lower than the output</span>
  <span class="token comment"># of `git ls-files | wc -l`. Alternatively, add `bash.showDirtyState = false` to the repository's</span>
  <span class="token comment"># config: `git config bash.showDirtyState false`.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VCS_MAX_INDEX_SIZE_DIRTY</span><span class="token operator">=</span>-1

  <span class="token comment"># Don't show Git status in prompt for repositories whose workdir matches this pattern.</span>
  <span class="token comment"># For example, if set to '~', the Git repository at $HOME/.git will be ignored.</span>
  <span class="token comment"># Multiple patterns can be combined with '|': '~|~/some/dir'.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN</span><span class="token operator">=</span><span class="token string">'~'</span>

  <span class="token comment"># Disable the default Git status formatting.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VCS_DISABLE_GITSTATUS_FORMATTING</span><span class="token operator">=</span>true
  <span class="token comment"># Install our own Git status formatter.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VCS_CONTENT_EXPANSION</span><span class="token operator">=</span><span class="token string">'${$((my_git_formatter(1)))+${my_git_format}}'</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VCS_LOADING_CONTENT_EXPANSION</span><span class="token operator">=</span><span class="token string">'${$((my_git_formatter(0)))+${my_git_format}}'</span>
  <span class="token comment"># Enable counters for staged, unstaged, etc.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> POWERLEVEL9K_VCS_<span class="token punctuation">{</span>STAGED,UNSTAGED,UNTRACKED,CONFLICTED,COMMITS_AHEAD,COMMITS_BEHIND<span class="token punctuation">}</span>_MAX_NUM<span class="token operator">=</span>-1

  <span class="token comment"># Icon color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_COLOR</span><span class="token operator">=</span><span class="token number">76</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VCS_LOADING_VISUAL_IDENTIFIER_COLOR</span><span class="token operator">=</span><span class="token number">244</span>
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_VCS_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>
  <span class="token comment"># Custom prefix.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_VCS_PREFIX='%246Fon '</span>

  <span class="token comment"># Show status of repositories of these types. You can add svn and/or hg if you are</span>
  <span class="token comment"># using them. If you do, your prompt may become slow even when your current directory</span>
  <span class="token comment"># isn't in an svn or hg reposotiry.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VCS_BACKENDS</span><span class="token operator">=</span><span class="token punctuation">(</span>git<span class="token punctuation">)</span>

  <span class="token comment"># These settings are used for respositories other than Git or when gitstatusd fails and</span>
  <span class="token comment"># Powerlevel10k has to fall back to using vcs_info.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VCS_CLEAN_FOREGROUND</span><span class="token operator">=</span><span class="token number">76</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VCS_UNTRACKED_FOREGROUND</span><span class="token operator">=</span><span class="token number">76</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VCS_MODIFIED_FOREGROUND</span><span class="token operator">=</span><span class="token number">178</span>

  <span class="token comment">##########################[ status: exit code of the last command ]###########################</span>
  <span class="token comment"># Enable OK_PIPE, ERROR_PIPE and ERROR_SIGNAL status states to allow us to enable, disable and</span>
  <span class="token comment"># style them independently from the regular OK and ERROR state.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_STATUS_EXTENDED_STATES</span><span class="token operator">=</span>true

  <span class="token comment"># Status on success. No content, just an icon. No need to show it if prompt_char is enabled as</span>
  <span class="token comment"># it will signify success by turning green.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_STATUS_OK</span><span class="token operator">=</span>false
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_STATUS_OK_FOREGROUND</span><span class="token operator">=</span><span class="token number">70</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_STATUS_OK_VISUAL_IDENTIFIER_EXPANSION</span><span class="token operator">=</span><span class="token string">'✔'</span>

  <span class="token comment"># Status when some part of a pipe command fails but the overall exit status is zero. It may look</span>
  <span class="token comment"># like this: 1|0.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_STATUS_OK_PIPE</span><span class="token operator">=</span>true
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_STATUS_OK_PIPE_FOREGROUND</span><span class="token operator">=</span><span class="token number">70</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_STATUS_OK_PIPE_VISUAL_IDENTIFIER_EXPANSION</span><span class="token operator">=</span><span class="token string">'✔'</span>

  <span class="token comment"># Status when it's just an error code (e.g., '1'). No need to show it if prompt_char is enabled as</span>
  <span class="token comment"># it will signify error by turning red.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_STATUS_ERROR</span><span class="token operator">=</span>false
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_STATUS_ERROR_FOREGROUND</span><span class="token operator">=</span><span class="token number">160</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_STATUS_ERROR_VISUAL_IDENTIFIER_EXPANSION</span><span class="token operator">=</span><span class="token string">'✘'</span>

  <span class="token comment"># Status when the last command was terminated by a signal.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_STATUS_ERROR_SIGNAL</span><span class="token operator">=</span>true
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_STATUS_ERROR_SIGNAL_FOREGROUND</span><span class="token operator">=</span><span class="token number">160</span>
  <span class="token comment"># Use terse signal names: "INT" instead of "SIGINT(2)".</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_STATUS_VERBOSE_SIGNAME</span><span class="token operator">=</span>false
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_STATUS_ERROR_SIGNAL_VISUAL_IDENTIFIER_EXPANSION</span><span class="token operator">=</span><span class="token string">'✘'</span>

  <span class="token comment"># Status when some part of a pipe command fails and the overall exit status is also non-zero.</span>
  <span class="token comment"># It may look like this: 1|0.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_STATUS_ERROR_PIPE</span><span class="token operator">=</span>true
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_STATUS_ERROR_PIPE_FOREGROUND</span><span class="token operator">=</span><span class="token number">160</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_STATUS_ERROR_PIPE_VISUAL_IDENTIFIER_EXPANSION</span><span class="token operator">=</span><span class="token string">'✘'</span>

  <span class="token comment">###################[ command_execution_time: duration of the last command ]###################</span>
  <span class="token comment"># Show duration of the last command if takes longer than this many seconds.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD</span><span class="token operator">=</span><span class="token number">3</span>
  <span class="token comment"># Show this many fractional digits. Zero means round to seconds.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION</span><span class="token operator">=</span><span class="token number">0</span>
  <span class="token comment"># Execution time color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_COMMAND_EXECUTION_TIME_FOREGROUND</span><span class="token operator">=</span><span class="token number">248</span>
  <span class="token comment"># Duration format: 1d 2h 3m 4s.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_COMMAND_EXECUTION_TIME_FORMAT</span><span class="token operator">=</span><span class="token string">'d h m s'</span>
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>
  <span class="token comment"># Custom prefix.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_COMMAND_EXECUTION_TIME_PREFIX='%246Ftook '</span>

  <span class="token comment">#######################[ background_jobs: presence of background jobs ]#######################</span>
  <span class="token comment"># Don't show the number of background jobs.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE</span><span class="token operator">=</span>false
  <span class="token comment"># Background jobs color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_BACKGROUND_JOBS_FOREGROUND</span><span class="token operator">=</span><span class="token number">37</span>
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_BACKGROUND_JOBS_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">#######################[ direnv: direnv status (https://direnv.net/) ]########################</span>
  <span class="token comment"># Direnv color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_DIRENV_FOREGROUND</span><span class="token operator">=</span><span class="token number">178</span>
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_DIRENV_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">###############[ asdf: asdf version manager (https://github.com/asdf-vm/asdf) ]###############</span>
  <span class="token comment"># Default asdf color. Only used to display tools for which there is no color override (see below).</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_ASDF_FOREGROUND</span><span class="token operator">=</span><span class="token number">66</span>

  <span class="token comment"># There are four parameters that can be used to hide asdf tools. Each parameter describes</span>
  <span class="token comment"># conditions under which a tool gets hidden. Parameters can hide tools but not unhide them. If at</span>
  <span class="token comment"># least one parameter decides to hide a tool, that tool gets hidden. If no parameter decides to</span>
  <span class="token comment"># hide a tool, it gets shown.</span>
  <span class="token comment">#</span>
  <span class="token comment"># Special note on the difference between POWERLEVEL9K_ASDF_SOURCES and</span>
  <span class="token comment"># POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW. Consider the effect of the following commands:</span>
  <span class="token comment">#</span>
  <span class="token comment">#   asdf local  python 3.8.1</span>
  <span class="token comment">#   asdf global python 3.8.1</span>
  <span class="token comment">#</span>
  <span class="token comment"># After running both commands the current python version is 3.8.1 and its source is "local" as</span>
  <span class="token comment"># it takes precedence over "global". If POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW is set to false,</span>
  <span class="token comment"># it'll hide python version in this case because 3.8.1 is the same as the global version.</span>
  <span class="token comment"># POWERLEVEL9K_ASDF_SOURCES will hide python version only if the value of this parameter doesn't</span>
  <span class="token comment"># contain "local".</span>

  <span class="token comment"># Hide tool versions that don't come from one of these sources.</span>
  <span class="token comment">#</span>
  <span class="token comment"># Available sources:</span>
  <span class="token comment">#</span>
  <span class="token comment"># - shell   `asdf current` says "set by ASDF_${TOOL}_VERSION environment variable"</span>
  <span class="token comment"># - local   `asdf current` says "set by /some/not/home/directory/file"</span>
  <span class="token comment"># - global  `asdf current` says "set by /home/username/file"</span>
  <span class="token comment">#</span>
  <span class="token comment"># Note: If this parameter is set to (shell local global), it won't hide tools.</span>
  <span class="token comment"># Tip:  Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SOURCES.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_ASDF_SOURCES</span><span class="token operator">=</span><span class="token punctuation">(</span>shell <span class="token builtin class-name">local</span> global<span class="token punctuation">)</span>

  <span class="token comment"># If set to false, hide tool versions that are the same as global.</span>
  <span class="token comment">#</span>
  <span class="token comment"># Note: The name of this parameter doesn't reflect its meaning at all.</span>
  <span class="token comment"># Note: If this parameter is set to true, it won't hide tools.</span>
  <span class="token comment"># Tip:  Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_PROMPT_ALWAYS_SHOW.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_ASDF_PROMPT_ALWAYS_SHOW</span><span class="token operator">=</span>false

  <span class="token comment"># If set to false, hide tool versions that are equal to "system".</span>
  <span class="token comment">#</span>
  <span class="token comment"># Note: If this parameter is set to true, it won't hide tools.</span>
  <span class="token comment"># Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_SYSTEM.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_ASDF_SHOW_SYSTEM</span><span class="token operator">=</span>true

  <span class="token comment"># If set to non-empty value, hide tools unless there is a file matching the specified file pattern</span>
  <span class="token comment"># in the current directory, or its parent diretory, or its grandparent directory, and so on.</span>
  <span class="token comment">#</span>
  <span class="token comment"># Note: If this parameter is set to empty value, it won't hide tools.</span>
  <span class="token comment"># Note: SHOW_ON_UPGLOB isn't specific to asdf. It works with all prompt segments.</span>
  <span class="token comment"># Tip: Override this parameter for ${TOOL} with POWERLEVEL9K_ASDF_${TOOL}_SHOW_ON_UPGLOB.</span>
  <span class="token comment">#</span>
  <span class="token comment"># Example: Hide nodejs version when there is no package.json and no *.js files in the current</span>
  <span class="token comment"># directory, in `..`, in `../..` and so on.</span>
  <span class="token comment">#</span>
  <span class="token comment">#   typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.js|package.json'</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_ASDF_SHOW_ON_UPGLOB</span><span class="token operator">=</span>

  <span class="token comment"># Ruby version from asdf.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_ASDF_RUBY_FOREGROUND</span><span class="token operator">=</span><span class="token number">168</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_RUBY_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_RUBY_SHOW_ON_UPGLOB='*.foo|*.bar'</span>

  <span class="token comment"># Python version from asdf.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_ASDF_PYTHON_FOREGROUND</span><span class="token operator">=</span><span class="token number">37</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_PYTHON_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_PYTHON_SHOW_ON_UPGLOB='*.foo|*.bar'</span>

  <span class="token comment"># Go version from asdf.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_ASDF_GO_FOREGROUND</span><span class="token operator">=</span><span class="token number">37</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_GO_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_GO_SHOW_ON_UPGLOB='*.foo|*.bar'</span>

  <span class="token comment"># Node.js version from asdf.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_ASDF_NODEJS_FOREGROUND</span><span class="token operator">=</span><span class="token number">70</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_NODEJS_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_NODEJS_SHOW_ON_UPGLOB='*.foo|*.bar'</span>

  <span class="token comment"># Rust version from asdf.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_ASDF_RUST_FOREGROUND</span><span class="token operator">=</span><span class="token number">37</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_RUST_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_RUST_SHOW_ON_UPGLOB='*.foo|*.bar'</span>

  <span class="token comment"># .NET Core version from asdf.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_ASDF_DOTNET_CORE_FOREGROUND</span><span class="token operator">=</span><span class="token number">134</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_DOTNET_CORE_SHOW_ON_UPGLOB='*.foo|*.bar'</span>

  <span class="token comment"># Flutter version from asdf.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_ASDF_FLUTTER_FOREGROUND</span><span class="token operator">=</span><span class="token number">38</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_FLUTTER_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_FLUTTER_SHOW_ON_UPGLOB='*.foo|*.bar'</span>

  <span class="token comment"># Lua version from asdf.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_ASDF_LUA_FOREGROUND</span><span class="token operator">=</span><span class="token number">32</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_LUA_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_LUA_SHOW_ON_UPGLOB='*.foo|*.bar'</span>

  <span class="token comment"># Java version from asdf.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_ASDF_JAVA_FOREGROUND</span><span class="token operator">=</span><span class="token number">32</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_JAVA_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_JAVA_SHOW_ON_UPGLOB='*.foo|*.bar'</span>

  <span class="token comment"># Perl version from asdf.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_ASDF_PERL_FOREGROUND</span><span class="token operator">=</span><span class="token number">67</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_PERL_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_PERL_SHOW_ON_UPGLOB='*.foo|*.bar'</span>

  <span class="token comment"># Erlang version from asdf.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_ASDF_ERLANG_FOREGROUND</span><span class="token operator">=</span><span class="token number">125</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_ERLANG_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_ERLANG_SHOW_ON_UPGLOB='*.foo|*.bar'</span>

  <span class="token comment"># Elixir version from asdf.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_ASDF_ELIXIR_FOREGROUND</span><span class="token operator">=</span><span class="token number">129</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_ELIXIR_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_ELIXIR_SHOW_ON_UPGLOB='*.foo|*.bar'</span>

  <span class="token comment"># Postgres version from asdf.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_ASDF_POSTGRES_FOREGROUND</span><span class="token operator">=</span><span class="token number">31</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_POSTGRES_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_POSTGRES_SHOW_ON_UPGLOB='*.foo|*.bar'</span>

  <span class="token comment"># PHP version from asdf.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_ASDF_PHP_FOREGROUND</span><span class="token operator">=</span><span class="token number">99</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_PHP_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ASDF_PHP_SHOW_ON_UPGLOB='*.foo|*.bar'</span>

  <span class="token comment">##########[ nordvpn: nordvpn connection status, linux only (https://nordvpn.com/) ]###########</span>
  <span class="token comment"># NordVPN connection indicator color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_NORDVPN_FOREGROUND</span><span class="token operator">=</span><span class="token number">39</span>
  <span class="token comment"># Hide NordVPN connection indicator when not connected.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> POWERLEVEL9K_NORDVPN_<span class="token punctuation">{</span>DISCONNECTED,CONNECTING,DISCONNECTING<span class="token punctuation">}</span>_CONTENT_EXPANSION<span class="token operator">=</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> POWERLEVEL9K_NORDVPN_<span class="token punctuation">{</span>DISCONNECTED,CONNECTING,DISCONNECTING<span class="token punctuation">}</span>_VISUAL_IDENTIFIER_EXPANSION<span class="token operator">=</span>
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_NORDVPN_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">#################[ ranger: ranger shell (https://github.com/ranger/ranger) ]##################</span>
  <span class="token comment"># Ranger shell color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_RANGER_FOREGROUND</span><span class="token operator">=</span><span class="token number">178</span>
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">######################[ nnn: nnn shell (https://github.com/jarun/nnn) ]#######################</span>
  <span class="token comment"># Nnn shell color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_NNN_FOREGROUND</span><span class="token operator">=</span><span class="token number">72</span>
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_NNN_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">###########################[ vim_shell: vim shell indicator (:sh) ]###########################</span>
  <span class="token comment"># Vim shell indicator color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VIM_SHELL_FOREGROUND</span><span class="token operator">=</span><span class="token number">34</span>
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_VIM_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">######[ midnight_commander: midnight commander shell (https://midnight-commander.org/) ]######</span>
  <span class="token comment"># Midnight Commander shell color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_MIDNIGHT_COMMANDER_FOREGROUND</span><span class="token operator">=</span><span class="token number">178</span>
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_MIDNIGHT_COMMANDER_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">#[ nix_shell: nix shell (https://nixos.org/nixos/nix-pills/developing-with-nix-shell.html) ]##</span>
  <span class="token comment"># Nix shell color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_NIX_SHELL_FOREGROUND</span><span class="token operator">=</span><span class="token number">74</span>

  <span class="token comment"># Tip: If you want to see just the icon without "pure" and "impure", uncomment the next line.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_NIX_SHELL_CONTENT_EXPANSION=</span>

  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_NIX_SHELL_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">##################################[ disk_usgae: disk usage ]##################################</span>
  <span class="token comment"># Colors for different levels of disk usage.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_DISK_USAGE_NORMAL_FOREGROUND</span><span class="token operator">=</span><span class="token number">35</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_DISK_USAGE_WARNING_FOREGROUND</span><span class="token operator">=</span><span class="token number">220</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_DISK_USAGE_CRITICAL_FOREGROUND</span><span class="token operator">=</span><span class="token number">160</span>
  <span class="token comment"># Thresholds for different levels of disk usage (percentage points).</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL</span><span class="token operator">=</span><span class="token number">90</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_DISK_USAGE_CRITICAL_LEVEL</span><span class="token operator">=</span><span class="token number">95</span>
  <span class="token comment"># If set to true, hide disk usage when below $POWERLEVEL9K_DISK_USAGE_WARNING_LEVEL percent.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_DISK_USAGE_ONLY_WARNING</span><span class="token operator">=</span>false
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_DISK_USAGE_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">###########[ vi_mode: vi mode (you don't need this if you've enabled prompt_char) ]###########</span>
  <span class="token comment"># Text and color for normal (a.k.a. command) vi mode.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VI_COMMAND_MODE_STRING</span><span class="token operator">=</span>NORMAL
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VI_MODE_NORMAL_FOREGROUND</span><span class="token operator">=</span><span class="token number">106</span>
  <span class="token comment"># Text and color for visual vi mode.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VI_VISUAL_MODE_STRING</span><span class="token operator">=</span>VISUAL
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VI_MODE_VISUAL_FOREGROUND</span><span class="token operator">=</span><span class="token number">68</span>
  <span class="token comment"># Text and color for overtype (a.k.a. overwrite and replace) vi mode.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VI_OVERWRITE_MODE_STRING</span><span class="token operator">=</span>OVERTYPE
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VI_MODE_OVERWRITE_FOREGROUND</span><span class="token operator">=</span><span class="token number">172</span>
  <span class="token comment"># Text and color for insert vi mode.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VI_INSERT_MODE_STRING</span><span class="token operator">=</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VI_MODE_INSERT_FOREGROUND</span><span class="token operator">=</span><span class="token number">66</span>

  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_RANGER_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">######################################[ ram: free RAM ]#######################################</span>
  <span class="token comment"># RAM color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_RAM_FOREGROUND</span><span class="token operator">=</span><span class="token number">66</span>
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_RAM_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">#####################################[ swap: used swap ]######################################</span>
  <span class="token comment"># Swap color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_SWAP_FOREGROUND</span><span class="token operator">=</span><span class="token number">96</span>
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_SWAP_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">######################################[ load: CPU load ]######################################</span>
  <span class="token comment"># Show average CPU load over this many last minutes. Valid values are 1, 5 and 15.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_LOAD_WHICH</span><span class="token operator">=</span><span class="token number">5</span>
  <span class="token comment"># Load color when load is under 50%.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_LOAD_NORMAL_FOREGROUND</span><span class="token operator">=</span><span class="token number">66</span>
  <span class="token comment"># Load color when load is between 50% and 70%.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_LOAD_WARNING_FOREGROUND</span><span class="token operator">=</span><span class="token number">178</span>
  <span class="token comment"># Load color when load is over 70%.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_LOAD_CRITICAL_FOREGROUND</span><span class="token operator">=</span><span class="token number">166</span>
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_LOAD_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">################[ todo: todo items (https://github.com/todotxt/todo.txt-cli) ]################</span>
  <span class="token comment"># Todo color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_TODO_FOREGROUND</span><span class="token operator">=</span><span class="token number">110</span>
  <span class="token comment"># Hide todo when the total number of tasks is zero.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_TODO_HIDE_ZERO_TOTAL</span><span class="token operator">=</span>true
  <span class="token comment"># Hide todo when the number of tasks after filtering is zero.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_TODO_HIDE_ZERO_FILTERED</span><span class="token operator">=</span>false

  <span class="token comment"># Todo format. The following parameters are available within the expansion.</span>
  <span class="token comment">#</span>
  <span class="token comment"># - P9K_TODO_TOTAL_TASK_COUNT     The total number of tasks.</span>
  <span class="token comment"># - P9K_TODO_FILTERED_TASK_COUNT  The number of tasks after filtering.</span>
  <span class="token comment">#</span>
  <span class="token comment"># These variables correspond to the last line of the output of `todo.sh -p ls`:</span>
  <span class="token comment">#</span>
  <span class="token comment">#   TODO: 24 of 42 tasks shown</span>
  <span class="token comment">#</span>
  <span class="token comment"># Here 24 is P9K_TODO_FILTERED_TASK_COUNT and 42 is P9K_TODO_TOTAL_TASK_COUNT.</span>
  <span class="token comment">#</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_TODO_CONTENT_EXPANSION='$P9K_TODO_FILTERED_TASK_COUNT'</span>

  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_TODO_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">###########[ timewarrior: timewarrior tracking status (https://timewarrior.net/) ]############</span>
  <span class="token comment"># Timewarrior color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_TIMEWARRIOR_FOREGROUND</span><span class="token operator">=</span><span class="token number">110</span>
  <span class="token comment"># If the tracked task is longer than 24 characters, truncate and append "…".</span>
  <span class="token comment"># Tip: To always display tasks without truncation, delete the following parameter.</span>
  <span class="token comment"># Tip: To hide task names and display just the icon when time tracking is enabled, set the</span>
  <span class="token comment"># value of the following parameter to "".</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_TIMEWARRIOR_CONTENT_EXPANSION</span><span class="token operator">=</span><span class="token string">'${P9K_CONTENT:0:24}${${P9K_CONTENT:24}:+…}'</span>

  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_TIMEWARRIOR_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">##################################[ context: user@hostname ]##################################</span>
  <span class="token comment"># Context color when running with privileges.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_CONTEXT_ROOT_FOREGROUND</span><span class="token operator">=</span><span class="token number">178</span>
  <span class="token comment"># Context color in SSH without privileges.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> POWERLEVEL9K_CONTEXT_<span class="token punctuation">{</span>REMOTE,REMOTE_SUDO<span class="token punctuation">}</span>_FOREGROUND<span class="token operator">=</span><span class="token number">180</span>
  <span class="token comment"># Default context color (no privileges, no SSH).</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_CONTEXT_FOREGROUND</span><span class="token operator">=</span><span class="token number">180</span>

  <span class="token comment"># Context format when running with privileges: bold user@hostname.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_CONTEXT_ROOT_TEMPLATE</span><span class="token operator">=</span><span class="token string">'%B%n@%m'</span>
  <span class="token comment"># Context format when in SSH without privileges: user@hostname.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> POWERLEVEL9K_CONTEXT_<span class="token punctuation">{</span>REMOTE,REMOTE_SUDO<span class="token punctuation">}</span>_TEMPLATE<span class="token operator">=</span><span class="token string">'%n@%m'</span>
  <span class="token comment"># Default context format (no privileges, no SSH): user@hostname.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_CONTEXT_TEMPLATE</span><span class="token operator">=</span><span class="token string">'%n@%m'</span>

  <span class="token comment"># Don't show context unless running with privileges or in SSH.</span>
  <span class="token comment"># Tip: Remove the next line to always show context.</span>
  <span class="token comment">#typeset -g POWERLEVEL9K_CONTEXT_{DEFAULT,SUDO}_{CONTENT,VISUAL_IDENTIFIER}_EXPANSION=</span>

  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_CONTEXT_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>
  <span class="token comment"># Custom prefix.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_CONTEXT_PREFIX='%246Fwith '</span>

  <span class="token comment">###[ virtualenv: python virtual environment (https://docs.python.org/3/library/venv.html) ]###</span>
  <span class="token comment"># Python virtual environment color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VIRTUALENV_FOREGROUND</span><span class="token operator">=</span><span class="token number">37</span>
  <span class="token comment"># Don't show Python version next to the virtual environment name.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VIRTUALENV_SHOW_PYTHON_VERSION</span><span class="token operator">=</span>false
  <span class="token comment"># Separate environment name from Python version only with a space.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> POWERLEVEL9K_VIRTUALENV_<span class="token punctuation">{</span>LEFT,RIGHT<span class="token punctuation">}</span>_DELIMITER<span class="token operator">=</span>
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_VIRTUALENV_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">#####################[ anaconda: conda environment (https://conda.io/) ]######################</span>
  <span class="token comment"># Anaconda environment color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_ANACONDA_FOREGROUND</span><span class="token operator">=</span><span class="token number">37</span>
  <span class="token comment"># Don't show Python version next to the anaconda environment name.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_ANACONDA_SHOW_PYTHON_VERSION</span><span class="token operator">=</span>false
  <span class="token comment"># Separate environment name from Python version only with a space.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> POWERLEVEL9K_ANACONDA_<span class="token punctuation">{</span>LEFT,RIGHT<span class="token punctuation">}</span>_DELIMITER<span class="token operator">=</span>
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_ANACONDA_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">################[ pyenv: python environment (https://github.com/pyenv/pyenv) ]################</span>
  <span class="token comment"># Pyenv color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_PYENV_FOREGROUND</span><span class="token operator">=</span><span class="token number">37</span>
  <span class="token comment"># Hide python version if it doesn't come from one of these sources.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_PYENV_SOURCES</span><span class="token operator">=</span><span class="token punctuation">(</span>shell <span class="token builtin class-name">local</span> global<span class="token punctuation">)</span>
  <span class="token comment"># If set to false, hide python version if it's the same as global:</span>
  <span class="token comment"># $(pyenv version-name) == $(pyenv global).</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_PYENV_PROMPT_ALWAYS_SHOW</span><span class="token operator">=</span>false
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_PYENV_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">################[ goenv: go environment (https://github.com/syndbg/goenv) ]################</span>
  <span class="token comment"># Goenv color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_GOENV_FOREGROUND</span><span class="token operator">=</span><span class="token number">37</span>
  <span class="token comment"># Hide go version if it doesn't come from one of these sources.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_GOENV_SOURCES</span><span class="token operator">=</span><span class="token punctuation">(</span>shell <span class="token builtin class-name">local</span> global<span class="token punctuation">)</span>
  <span class="token comment"># If set to false, hide go version if it's the same as global:</span>
  <span class="token comment"># $(goenv version-name) == $(goenv global).</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_GOENV_PROMPT_ALWAYS_SHOW</span><span class="token operator">=</span>false
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_GOENV_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">##########[ nodenv: node.js version from nodenv (https://github.com/nodenv/nodenv) ]##########</span>
  <span class="token comment"># Nodenv color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_NODENV_FOREGROUND</span><span class="token operator">=</span><span class="token number">70</span>
  <span class="token comment"># Don't show node version if it's the same as global: $(nodenv version-name) == $(nodenv global).</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_NODENV_PROMPT_ALWAYS_SHOW</span><span class="token operator">=</span>false
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_NODENV_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">##############[ nvm: node.js version from nvm (https://github.com/nvm-sh/nvm) ]###############</span>
  <span class="token comment"># Nvm color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_NVM_FOREGROUND</span><span class="token operator">=</span><span class="token number">70</span>
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_NVM_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">############[ nodeenv: node.js environment (https://github.com/ekalinin/nodeenv) ]############</span>
  <span class="token comment"># Nodeenv color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_NODEENV_FOREGROUND</span><span class="token operator">=</span><span class="token number">70</span>
  <span class="token comment"># Don't show Node version next to the environment name.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_NODEENV_SHOW_NODE_VERSION</span><span class="token operator">=</span>false
  <span class="token comment"># Separate environment name from Node version only with a space.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> POWERLEVEL9K_NODEENV_<span class="token punctuation">{</span>LEFT,RIGHT<span class="token punctuation">}</span>_DELIMITER<span class="token operator">=</span>
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_NODEENV_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">##############################[ node_version: node.js version ]###############################</span>
  <span class="token comment"># Node version color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_NODE_VERSION_FOREGROUND</span><span class="token operator">=</span><span class="token number">70</span>
  <span class="token comment"># Show node version only when in a directory tree containing package.json.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_NODE_VERSION_PROJECT_ONLY</span><span class="token operator">=</span>true
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_NODE_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">#######################[ go_version: go version (https://golang.org) ]########################</span>
  <span class="token comment"># Go version color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_GO_VERSION_FOREGROUND</span><span class="token operator">=</span><span class="token number">37</span>
  <span class="token comment"># Show go version only when in a go project subdirectory.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_GO_VERSION_PROJECT_ONLY</span><span class="token operator">=</span>true
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_GO_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">#################[ rust_version: rustc version (https://www.rust-lang.org) ]##################</span>
  <span class="token comment"># Rust version color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_RUST_VERSION_FOREGROUND</span><span class="token operator">=</span><span class="token number">37</span>
  <span class="token comment"># Show rust version only when in a rust project subdirectory.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_RUST_VERSION_PROJECT_ONLY</span><span class="token operator">=</span>true
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_RUST_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">###############[ dotnet_version: .NET version (https://dotnet.microsoft.com) ]################</span>
  <span class="token comment"># .NET version color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_DOTNET_VERSION_FOREGROUND</span><span class="token operator">=</span><span class="token number">134</span>
  <span class="token comment"># Show .NET version only when in a .NET project subdirectory.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_DOTNET_VERSION_PROJECT_ONLY</span><span class="token operator">=</span>true
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_DOTNET_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">#####################[ php_version: php version (https://www.php.net/) ]######################</span>
  <span class="token comment"># PHP version color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_PHP_VERSION_FOREGROUND</span><span class="token operator">=</span><span class="token number">99</span>
  <span class="token comment"># Show PHP version only when in a PHP project subdirectory.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_PHP_VERSION_PROJECT_ONLY</span><span class="token operator">=</span>true
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_PHP_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">##########[ laravel_version: laravel php framework version (https://laravel.com/) ]###########</span>
  <span class="token comment"># Laravel version color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_LARAVEL_VERSION_FOREGROUND</span><span class="token operator">=</span><span class="token number">161</span>
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_LARAVEL_VERSION_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">#############[ rbenv: ruby version from rbenv (https://github.com/rbenv/rbenv) ]##############</span>
  <span class="token comment"># Rbenv color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_RBENV_FOREGROUND</span><span class="token operator">=</span><span class="token number">168</span>
  <span class="token comment"># Hide ruby version if it doesn't come from one of these sources.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_RBENV_SOURCES</span><span class="token operator">=</span><span class="token punctuation">(</span>shell <span class="token builtin class-name">local</span> global<span class="token punctuation">)</span>
  <span class="token comment"># If set to false, hide ruby version if it's the same as global:</span>
  <span class="token comment"># $(rbenv version-name) == $(rbenv global).</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_RBENV_PROMPT_ALWAYS_SHOW</span><span class="token operator">=</span>false
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_RBENV_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">#######################[ rvm: ruby version from rvm (https://rvm.io) ]########################</span>
  <span class="token comment"># Rvm color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_RVM_FOREGROUND</span><span class="token operator">=</span><span class="token number">168</span>
  <span class="token comment"># Don't show @gemset at the end.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_RVM_SHOW_GEMSET</span><span class="token operator">=</span>false
  <span class="token comment"># Don't show ruby- at the front.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_RVM_SHOW_PREFIX</span><span class="token operator">=</span>false
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_RVM_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">###########[ fvm: flutter version management (https://github.com/leoafarias/fvm) ]############</span>
  <span class="token comment"># Fvm color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_FVM_FOREGROUND</span><span class="token operator">=</span><span class="token number">38</span>
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_FVM_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">##########[ luaenv: lua version from luaenv (https://github.com/cehoffman/luaenv) ]###########</span>
  <span class="token comment"># Lua color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_LUAENV_FOREGROUND</span><span class="token operator">=</span><span class="token number">32</span>
  <span class="token comment"># Hide lua version if it doesn't come from one of these sources.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_LUAENV_SOURCES</span><span class="token operator">=</span><span class="token punctuation">(</span>shell <span class="token builtin class-name">local</span> global<span class="token punctuation">)</span>
  <span class="token comment"># If set to false, hide lua version if it's the same as global:</span>
  <span class="token comment"># $(luaenv version-name) == $(luaenv global).</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_LUAENV_PROMPT_ALWAYS_SHOW</span><span class="token operator">=</span>false
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_LUAENV_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">###############[ jenv: java version from jenv (https://github.com/jenv/jenv) ]################</span>
  <span class="token comment"># Java color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_JENV_FOREGROUND</span><span class="token operator">=</span><span class="token number">32</span>
  <span class="token comment"># Hide java version if it doesn't come from one of these sources.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_JENV_SOURCES</span><span class="token operator">=</span><span class="token punctuation">(</span>shell <span class="token builtin class-name">local</span> global<span class="token punctuation">)</span>
  <span class="token comment"># If set to false, hide java version if it's the same as global:</span>
  <span class="token comment"># $(jenv version-name) == $(jenv global).</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_JENV_PROMPT_ALWAYS_SHOW</span><span class="token operator">=</span>false
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_JENV_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">###########[ plenv: perl version from plenv (https://github.com/tokuhirom/plenv) ]############</span>
  <span class="token comment"># Perl color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_PLENV_FOREGROUND</span><span class="token operator">=</span><span class="token number">67</span>
  <span class="token comment"># Hide perl version if it doesn't come from one of these sources.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_PLENV_SOURCES</span><span class="token operator">=</span><span class="token punctuation">(</span>shell <span class="token builtin class-name">local</span> global<span class="token punctuation">)</span>
  <span class="token comment"># If set to false, hide perl version if it's the same as global:</span>
  <span class="token comment"># $(plenv version-name) == $(plenv global).</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_PLENV_PROMPT_ALWAYS_SHOW</span><span class="token operator">=</span>false
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_PLENV_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">############[ phpenv: php version from phpenv (https://github.com/phpenv/phpenv) ]############</span>
  <span class="token comment"># PHP color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_PHPENV_FOREGROUND</span><span class="token operator">=</span><span class="token number">99</span>
  <span class="token comment"># Hide php version if it doesn't come from one of these sources.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_PHPENV_SOURCES</span><span class="token operator">=</span><span class="token punctuation">(</span>shell <span class="token builtin class-name">local</span> global<span class="token punctuation">)</span>
  <span class="token comment"># If set to false, hide php version if it's the same as global:</span>
  <span class="token comment"># $(phpenv version-name) == $(phpenv global).</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_PHPENV_PROMPT_ALWAYS_SHOW</span><span class="token operator">=</span>false
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_PHPENV_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">################[ terraform: terraform workspace (https://www.terraform.io) ]#################</span>
  <span class="token comment"># POWERLEVEL9K_TERRAFORM_CLASSES is an array with even number of elements. The first element</span>
  <span class="token comment"># in each pair defines a pattern against which the current terraform workspace gets matched.</span>
  <span class="token comment"># More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)</span>
  <span class="token comment"># that gets matched. If you unset all POWERLEVEL9K_TERRAFORM_*CONTENT_EXPANSION parameters,</span>
  <span class="token comment"># you'll see this value in your prompt. The second element of each pair in</span>
  <span class="token comment"># POWERLEVEL9K_TERRAFORM_CLASSES defines the workspace class. Patterns are tried in order. The</span>
  <span class="token comment"># first match wins.</span>
  <span class="token comment">#</span>
  <span class="token comment"># For example, given these settings:</span>
  <span class="token comment">#</span>
  <span class="token comment">#   typeset -g POWERLEVEL9K_TERRAFORM_CLASSES=(</span>
  <span class="token comment">#     '*prod*'  PROD</span>
  <span class="token comment">#     '*test*'  TEST</span>
  <span class="token comment">#     '*'       DEFAULT)</span>
  <span class="token comment">#</span>
  <span class="token comment"># If your current terraform workspace is "project_test", its class is TEST because "project_test"</span>
  <span class="token comment"># doesn't match the pattern '*prod*' but does match '*test*'.</span>
  <span class="token comment">#</span>
  <span class="token comment"># You can define different colors, icons and content expansions for different classes:</span>
  <span class="token comment">#</span>
  <span class="token comment">#   typeset -g POWERLEVEL9K_TERRAFORM_TEST_FOREGROUND=28</span>
  <span class="token comment">#   typeset -g POWERLEVEL9K_TERRAFORM_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>
  <span class="token comment">#   typeset -g POWERLEVEL9K_TERRAFORM_TEST_CONTENT_EXPANSION='&gt; ${P9K_CONTENT} &lt;'</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_TERRAFORM_CLASSES</span><span class="token operator">=</span><span class="token punctuation">(</span>
      <span class="token comment"># '*prod*'  PROD    # These values are examples that are unlikely</span>
      <span class="token comment"># '*test*'  TEST    # to match your needs. Customize them as needed.</span>
      <span class="token string">'*'</span>       DEFAULT<span class="token punctuation">)</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_TERRAFORM_DEFAULT_FOREGROUND</span><span class="token operator">=</span><span class="token number">38</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_TERRAFORM_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############</span>
  <span class="token comment"># Show kubecontext only when the the command you are typing invokes one of these tools.</span>
  <span class="token comment"># Tip: Remove the next line to always show kubecontext.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND</span><span class="token operator">=</span><span class="token string">'kubectl|helm|kubens|kubectx|oc'</span>

  <span class="token comment"># Kubernetes context classes for the purpose of using different colors, icons and expansions with</span>
  <span class="token comment"># different contexts.</span>
  <span class="token comment">#</span>
  <span class="token comment"># POWERLEVEL9K_KUBECONTEXT_CLASSES is an array with even number of elements. The first element</span>
  <span class="token comment"># in each pair defines a pattern against which the current kubernetes context gets matched.</span>
  <span class="token comment"># More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)</span>
  <span class="token comment"># that gets matched. If you unset all POWERLEVEL9K_KUBECONTEXT_*CONTENT_EXPANSION parameters,</span>
  <span class="token comment"># you'll see this value in your prompt. The second element of each pair in</span>
  <span class="token comment"># POWERLEVEL9K_KUBECONTEXT_CLASSES defines the context class. Patterns are tried in order. The</span>
  <span class="token comment"># first match wins.</span>
  <span class="token comment">#</span>
  <span class="token comment"># For example, given these settings:</span>
  <span class="token comment">#</span>
  <span class="token comment">#   typeset -g POWERLEVEL9K_KUBECONTEXT_CLASSES=(</span>
  <span class="token comment">#     '*prod*'  PROD</span>
  <span class="token comment">#     '*test*'  TEST</span>
  <span class="token comment">#     '*'       DEFAULT)</span>
  <span class="token comment">#</span>
  <span class="token comment"># If your current kubernetes context is "deathray-testing/default", its class is TEST</span>
  <span class="token comment"># because "deathray-testing/default" doesn't match the pattern '*prod*' but does match '*test*'.</span>
  <span class="token comment">#</span>
  <span class="token comment"># You can define different colors, icons and content expansions for different classes:</span>
  <span class="token comment">#</span>
  <span class="token comment">#   typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_FOREGROUND=28</span>
  <span class="token comment">#   typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>
  <span class="token comment">#   typeset -g POWERLEVEL9K_KUBECONTEXT_TEST_CONTENT_EXPANSION='&gt; ${P9K_CONTENT} &lt;'</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_KUBECONTEXT_CLASSES</span><span class="token operator">=</span><span class="token punctuation">(</span>
      <span class="token comment"># '*prod*'  PROD    # These values are examples that are unlikely</span>
      <span class="token comment"># '*test*'  TEST    # to match your needs. Customize them as needed.</span>
      <span class="token string">'*'</span>       DEFAULT<span class="token punctuation">)</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_KUBECONTEXT_DEFAULT_FOREGROUND</span><span class="token operator">=</span><span class="token number">134</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_KUBECONTEXT_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment"># Use POWERLEVEL9K_KUBECONTEXT_CONTENT_EXPANSION to specify the content displayed by kubecontext</span>
  <span class="token comment"># segment. Parameter expansions are very flexible and fast, too. See reference:</span>
  <span class="token comment"># http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion.</span>
  <span class="token comment">#</span>
  <span class="token comment"># Within the expansion the following parameters are always available:</span>
  <span class="token comment">#</span>
  <span class="token comment"># - P9K_CONTENT                The content that would've been displayed if there was no content</span>
  <span class="token comment">#                              expansion defined.</span>
  <span class="token comment"># - P9K_KUBECONTEXT_NAME       The current context's name. Corresponds to column NAME in the</span>
  <span class="token comment">#                              output of `kubectl config get-contexts`.</span>
  <span class="token comment"># - P9K_KUBECONTEXT_CLUSTER    The current context's cluster. Corresponds to column CLUSTER in the</span>
  <span class="token comment">#                              output of `kubectl config get-contexts`.</span>
  <span class="token comment"># - P9K_KUBECONTEXT_NAMESPACE  The current context's namespace. Corresponds to column NAMESPACE</span>
  <span class="token comment">#                              in the output of `kubectl config get-contexts`. If there is no</span>
  <span class="token comment">#                              namespace, the parameter is set to "default".</span>
  <span class="token comment"># - P9K_KUBECONTEXT_USER       The current context's user. Corresponds to column AUTHINFO in the</span>
  <span class="token comment">#                              output of `kubectl config get-contexts`.</span>
  <span class="token comment">#</span>
  <span class="token comment"># If the context points to Google Kubernetes Engine (GKE) or Elastic Kubernetes Service (EKS),</span>
  <span class="token comment"># the following extra parameters are available:</span>
  <span class="token comment">#</span>
  <span class="token comment"># - P9K_KUBECONTEXT_CLOUD_NAME     Either "gke" or "eks".</span>
  <span class="token comment"># - P9K_KUBECONTEXT_CLOUD_ACCOUNT  Account/project ID.</span>
  <span class="token comment"># - P9K_KUBECONTEXT_CLOUD_ZONE     Availability zone.</span>
  <span class="token comment"># - P9K_KUBECONTEXT_CLOUD_CLUSTER  Cluster.</span>
  <span class="token comment">#</span>
  <span class="token comment"># P9K_KUBECONTEXT_CLOUD_* parameters are derived from P9K_KUBECONTEXT_CLUSTER. For example,</span>
  <span class="token comment"># if P9K_KUBECONTEXT_CLUSTER is "gke_my-account_us-east1-a_my-cluster-01":</span>
  <span class="token comment">#</span>
  <span class="token comment">#   - P9K_KUBECONTEXT_CLOUD_NAME=gke</span>
  <span class="token comment">#   - P9K_KUBECONTEXT_CLOUD_ACCOUNT=my-account</span>
  <span class="token comment">#   - P9K_KUBECONTEXT_CLOUD_ZONE=us-east1-a</span>
  <span class="token comment">#   - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01</span>
  <span class="token comment">#</span>
  <span class="token comment"># If P9K_KUBECONTEXT_CLUSTER is "arn:aws:eks:us-east-1:123456789012:cluster/my-cluster-01":</span>
  <span class="token comment">#</span>
  <span class="token comment">#   - P9K_KUBECONTEXT_CLOUD_NAME=eks</span>
  <span class="token comment">#   - P9K_KUBECONTEXT_CLOUD_ACCOUNT=123456789012</span>
  <span class="token comment">#   - P9K_KUBECONTEXT_CLOUD_ZONE=us-east-1</span>
  <span class="token comment">#   - P9K_KUBECONTEXT_CLOUD_CLUSTER=my-cluster-01</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION</span><span class="token operator">=</span>
  <span class="token comment"># Show P9K_KUBECONTEXT_CLOUD_CLUSTER if it's not empty and fall back to P9K_KUBECONTEXT_NAME.</span>
  <span class="token assign-left variable">POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION</span><span class="token operator">+=</span><span class="token string">'${P9K_KUBECONTEXT_CLOUD_CLUSTER:-${P9K_KUBECONTEXT_NAME}}'</span>
  <span class="token comment"># Append the current context's namespace if it's not "default".</span>
  <span class="token assign-left variable">POWERLEVEL9K_KUBECONTEXT_DEFAULT_CONTENT_EXPANSION</span><span class="token operator">+=</span><span class="token string">'${${:-/$P9K_KUBECONTEXT_NAMESPACE}:#/default}'</span>

  <span class="token comment"># Custom prefix.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_KUBECONTEXT_PREFIX='%246Fat '</span>

  <span class="token comment">#[ aws: aws profile (https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) ]#</span>
  <span class="token comment"># Show aws only when the the command you are typing invokes one of these tools.</span>
  <span class="token comment"># Tip: Remove the next line to always show aws.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_AWS_SHOW_ON_COMMAND</span><span class="token operator">=</span><span class="token string">'aws|awless|terraform|pulumi'</span>

  <span class="token comment"># POWERLEVEL9K_AWS_CLASSES is an array with even number of elements. The first element</span>
  <span class="token comment"># in each pair defines a pattern against which the current AWS profile gets matched.</span>
  <span class="token comment"># More specifically, it's P9K_CONTENT prior to the application of context expansion (see below)</span>
  <span class="token comment"># that gets matched. If you unset all POWERLEVEL9K_AWS_*CONTENT_EXPANSION parameters,</span>
  <span class="token comment"># you'll see this value in your prompt. The second element of each pair in</span>
  <span class="token comment"># POWERLEVEL9K_AWS_CLASSES defines the profile class. Patterns are tried in order. The</span>
  <span class="token comment"># first match wins.</span>
  <span class="token comment">#</span>
  <span class="token comment"># For example, given these settings:</span>
  <span class="token comment">#</span>
  <span class="token comment">#   typeset -g POWERLEVEL9K_AWS_CLASSES=(</span>
  <span class="token comment">#     '*prod*'  PROD</span>
  <span class="token comment">#     '*test*'  TEST</span>
  <span class="token comment">#     '*'       DEFAULT)</span>
  <span class="token comment">#</span>
  <span class="token comment"># If your current AWS profile is "company_test", its class is TEST</span>
  <span class="token comment"># because "company_test" doesn't match the pattern '*prod*' but does match '*test*'.</span>
  <span class="token comment">#</span>
  <span class="token comment"># You can define different colors, icons and content expansions for different classes:</span>
  <span class="token comment">#</span>
  <span class="token comment">#   typeset -g POWERLEVEL9K_AWS_TEST_FOREGROUND=28</span>
  <span class="token comment">#   typeset -g POWERLEVEL9K_AWS_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>
  <span class="token comment">#   typeset -g POWERLEVEL9K_AWS_TEST_CONTENT_EXPANSION='&gt; ${P9K_CONTENT} &lt;'</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_AWS_CLASSES</span><span class="token operator">=</span><span class="token punctuation">(</span>
      <span class="token comment"># '*prod*'  PROD    # These values are examples that are unlikely</span>
      <span class="token comment"># '*test*'  TEST    # to match your needs. Customize them as needed.</span>
      <span class="token string">'*'</span>       DEFAULT<span class="token punctuation">)</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_AWS_DEFAULT_FOREGROUND</span><span class="token operator">=</span><span class="token number">208</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_AWS_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">#[ aws_eb_env: aws elastic beanstalk environment (https://aws.amazon.com/elasticbeanstalk/) ]#</span>
  <span class="token comment"># AWS Elastic Beanstalk environment color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_AWS_EB_ENV_FOREGROUND</span><span class="token operator">=</span><span class="token number">70</span>
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_AWS_EB_ENV_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">##########[ azure: azure account name (https://docs.microsoft.com/en-us/cli/azure) ]##########</span>
  <span class="token comment"># Show azure only when the the command you are typing invokes one of these tools.</span>
  <span class="token comment"># Tip: Remove the next line to always show azure.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_AZURE_SHOW_ON_COMMAND</span><span class="token operator">=</span><span class="token string">'az|terraform|pulumi'</span>
  <span class="token comment"># Azure account name color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_AZURE_FOREGROUND</span><span class="token operator">=</span><span class="token number">32</span>
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_AZURE_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">##########[ gcloud: google cloud account and project (https://cloud.google.com/) ]###########</span>
  <span class="token comment"># Show gcloud only when the the command you are typing invokes one of these tools.</span>
  <span class="token comment"># Tip: Remove the next line to always show gcloud.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_GCLOUD_SHOW_ON_COMMAND</span><span class="token operator">=</span><span class="token string">'gcloud|gcs'</span>
   <span class="token comment"># Google cloud color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_GCLOUD_FOREGROUND</span><span class="token operator">=</span><span class="token number">32</span>

  <span class="token comment"># Google cloud format. Change the value of POWERLEVEL9K_GCLOUD_CONTENT_EXPANSION if the default</span>
  <span class="token comment"># is too verbose or not informative enough.</span>
  <span class="token comment">#</span>
  <span class="token comment">#   P9K_GCLOUD_ACCOUNT: the output of `gcloud config get-value account`</span>
  <span class="token comment">#   P9K_GCLOUD_PROJECT: the output of `gcloud config get-value project`</span>
  <span class="token comment">#   ${VARIABLE//\%/%%}: ${VARIABLE} with all occurences of '%' replaced with '%%'.</span>
  <span class="token comment">#</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_GCLOUD_CONTENT_EXPANSION</span><span class="token operator">=</span><span class="token string">'${P9K_GCLOUD_PROJECT//\%/%%}'</span>

  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_GCLOUD_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">#[ google_app_cred: google application credentials (https://cloud.google.com/docs/authentication/production) ]#</span>
  <span class="token comment"># Show google_app_cred only when the the command you are typing invokes one of these tools.</span>
  <span class="token comment"># Tip: Remove the next line to always show google_app_cred.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_GOOGLE_APP_CRED_SHOW_ON_COMMAND</span><span class="token operator">=</span><span class="token string">'terraform|pulumi'</span>

  <span class="token comment"># Google application credentials classes for the purpose of using different colors, icons and</span>
  <span class="token comment"># expansions with different credentials.</span>
  <span class="token comment">#</span>
  <span class="token comment"># POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES is an array with even number of elements. The first</span>
  <span class="token comment"># element in each pair defines a pattern against which the current kubernetes context gets</span>
  <span class="token comment"># matched. More specifically, it's P9K_CONTENT prior to the application of context expansion</span>
  <span class="token comment"># (see below) that gets matched. If you unset all POWERLEVEL9K_GOOGLE_APP_CRED_*CONTENT_EXPANSION</span>
  <span class="token comment"># parameters, you'll see this value in your prompt. The second element of each pair in</span>
  <span class="token comment"># POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES defines the context class. Patterns are tried in order.</span>
  <span class="token comment"># The first match wins.</span>
  <span class="token comment">#</span>
  <span class="token comment"># For example, given these settings:</span>
  <span class="token comment">#</span>
  <span class="token comment">#   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES=(</span>
  <span class="token comment">#     '*:*prod*:*'  PROD</span>
  <span class="token comment">#     '*:*test*:*'  TEST</span>
  <span class="token comment">#     '*'           DEFAULT)</span>
  <span class="token comment">#</span>
  <span class="token comment"># If your current Google application credentials is "service_account deathray-testing x@y.com",</span>
  <span class="token comment"># its class is TEST because it doesn't match the pattern '* *prod* *' but does match '* *test* *'.</span>
  <span class="token comment">#</span>
  <span class="token comment"># You can define different colors, icons and content expansions for different classes:</span>
  <span class="token comment">#</span>
  <span class="token comment">#   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_FOREGROUND=28</span>
  <span class="token comment">#   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>
  <span class="token comment">#   typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_TEST_CONTENT_EXPANSION='$P9K_GOOGLE_APP_CRED_PROJECT_ID'</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_GOOGLE_APP_CRED_CLASSES</span><span class="token operator">=</span><span class="token punctuation">(</span>
      <span class="token comment"># '*:*prod*:*'  PROD    # These values are examples that are unlikely</span>
      <span class="token comment"># '*:*test*:*'  TEST    # to match your needs. Customize them as needed.</span>
      <span class="token string">'*'</span>             DEFAULT<span class="token punctuation">)</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_FOREGROUND</span><span class="token operator">=</span><span class="token number">32</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment"># Use POWERLEVEL9K_GOOGLE_APP_CRED_CONTENT_EXPANSION to specify the content displayed by</span>
  <span class="token comment"># google_app_cred segment. Parameter expansions are very flexible and fast, too. See reference:</span>
  <span class="token comment"># http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion.</span>
  <span class="token comment">#</span>
  <span class="token comment"># You can use the following parameters in the expansion. Each of them corresponds to one of the</span>
  <span class="token comment"># fields in the JSON file pointed to by GOOGLE_APPLICATION_CREDENTIALS.</span>
  <span class="token comment">#</span>
  <span class="token comment">#   Parameter                        | JSON key file field</span>
  <span class="token comment">#   ---------------------------------+---------------</span>
  <span class="token comment">#   P9K_GOOGLE_APP_CRED_TYPE         | type</span>
  <span class="token comment">#   P9K_GOOGLE_APP_CRED_PROJECT_ID   | project_id</span>
  <span class="token comment">#   P9K_GOOGLE_APP_CRED_CLIENT_EMAIL | client_email</span>
  <span class="token comment">#</span>
  <span class="token comment"># Note: ${VARIABLE//\%/%%} expands to ${VARIABLE} with all occurences of '%' replaced by '%%'.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_GOOGLE_APP_CRED_DEFAULT_CONTENT_EXPANSION</span><span class="token operator">=</span><span class="token string">'${P9K_GOOGLE_APP_CRED_PROJECT_ID//\%/%%}'</span>

  <span class="token comment">###############################[ public_ip: public IP address ]###############################</span>
  <span class="token comment"># Public IP color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_PUBLIC_IP_FOREGROUND</span><span class="token operator">=</span><span class="token number">94</span>
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_PUBLIC_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">########################[ vpn_ip: virtual private network indicator ]#########################</span>
  <span class="token comment"># VPN IP color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VPN_IP_FOREGROUND</span><span class="token operator">=</span><span class="token number">81</span>
  <span class="token comment"># When on VPN, show just an icon without the IP address.</span>
  <span class="token comment"># Tip: To display the private IP address when on VPN, remove the next line.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VPN_IP_CONTENT_EXPANSION</span><span class="token operator">=</span>
  <span class="token comment"># Regular expression for the VPN network interface. Run `ifconfig` or `ip -4 a show` while on VPN</span>
  <span class="token comment"># to see the name of the interface.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_VPN_IP_INTERFACE</span><span class="token operator">=</span><span class="token string">'(wg|(.*tun))[0-9]*'</span>
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_VPN_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">###########[ ip: ip address and bandwidth usage for a specified network interface ]###########</span>
  <span class="token comment"># IP color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_IP_FOREGROUND</span><span class="token operator">=</span><span class="token number">38</span>
  <span class="token comment"># The following parameters are accessible within the expansion:</span>
  <span class="token comment">#</span>
  <span class="token comment">#   Parameter             | Meaning</span>
  <span class="token comment">#   ----------------------+---------------</span>
  <span class="token comment">#   P9K_IP_IP         | IP address</span>
  <span class="token comment">#   P9K_IP_INTERFACE  | network interface</span>
  <span class="token comment">#   P9K_IP_RX_BYTES   | total number of bytes received</span>
  <span class="token comment">#   P9K_IP_TX_BYTES   | total number of bytes sent</span>
  <span class="token comment">#   P9K_IP_RX_RATE    | receive rate (since last prompt)</span>
  <span class="token comment">#   P9K_IP_TX_RATE    | send rate (since last prompt)</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_IP_CONTENT_EXPANSION</span><span class="token operator">=</span><span class="token string">'%70F⇣$P9K_IP_RX_RATE %215F⇡$P9K_IP_TX_RATE %38F$P9K_IP_IP'</span>
  <span class="token comment"># Show information for the first network interface whose name matches this regular expression.</span>
  <span class="token comment"># Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_IP_INTERFACE</span><span class="token operator">=</span><span class="token string">'wlp2s0*'</span>
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_IP_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">#########################[ proxy: system-wide http/https/ftp proxy ]##########################</span>
  <span class="token comment"># Proxy color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_PROXY_FOREGROUND</span><span class="token operator">=</span><span class="token number">68</span>
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_PROXY_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment">################################[ battery: internal battery ]#################################</span>
  <span class="token comment"># Show battery in red when it's below this level and not connected to power supply.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_BATTERY_LOW_THRESHOLD</span><span class="token operator">=</span><span class="token number">20</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_BATTERY_LOW_FOREGROUND</span><span class="token operator">=</span><span class="token number">160</span>
  <span class="token comment"># Show battery in green when it's charging or fully charged.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> POWERLEVEL9K_BATTERY_<span class="token punctuation">{</span>CHARGING,CHARGED<span class="token punctuation">}</span>_FOREGROUND<span class="token operator">=</span><span class="token number">70</span>
  <span class="token comment"># Show battery in yellow when it's discharging.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_BATTERY_DISCONNECTED_FOREGROUND</span><span class="token operator">=</span><span class="token number">178</span>
  <span class="token comment"># Battery pictograms going from low to high level of charge.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_BATTERY_STAGES</span><span class="token operator">=</span><span class="token string">'\uf58d\uf579\uf57a\uf57b\uf57c\uf57d\uf57e\uf57f\uf580\uf581\uf578'</span>
  <span class="token comment"># Don't show the remaining time to charge/discharge.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_BATTERY_VERBOSE</span><span class="token operator">=</span>false

  <span class="token comment">#####################################[ wifi: wifi speed ]#####################################</span>
  <span class="token comment"># WiFi color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_WIFI_FOREGROUND</span><span class="token operator">=</span><span class="token number">68</span>
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment"># Use different colors and icons depending on signal strength ($P9K_WIFI_BARS).</span>
  <span class="token comment">#</span>
  <span class="token comment">#   # Wifi colors and icons for different signal strength levels (low to high).</span>
  <span class="token comment">#   typeset -g my_wifi_fg=(68 68 68 68 68)                           # &lt;-- change these values</span>
  <span class="token comment">#   typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi')     # &lt;-- change these values</span>
  <span class="token comment">#</span>
  <span class="token comment">#   typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps'</span>
  <span class="token comment">#   typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}'</span>
  <span class="token comment">#</span>
  <span class="token comment"># The following parameters are accessible within the expansions:</span>
  <span class="token comment">#</span>
  <span class="token comment">#   Parameter             | Meaning</span>
  <span class="token comment">#   ----------------------+---------------</span>
  <span class="token comment">#   P9K_WIFI_SSID         | service set identifier, a.k.a. network name</span>
  <span class="token comment">#   P9K_WIFI_LINK_AUTH    | authentication protocol such as "wpa2-psk" or "none"</span>
  <span class="token comment">#   P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second</span>
  <span class="token comment">#   P9K_WIFI_RSSI         | signal strength in dBm, from -120 to 0</span>
  <span class="token comment">#   P9K_WIFI_NOISE        | noise in dBm, from -120 to 0</span>
  <span class="token comment">#   P9K_WIFI_BARS         | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE)</span>
  <span class="token comment">#</span>
  <span class="token comment"># All parameters except P9K_WIFI_BARS are extracted from the output of the following command:</span>
  <span class="token comment">#</span>
  <span class="token comment">#   /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I</span>

  <span class="token comment">####################################[ time: current time ]####################################</span>
  <span class="token comment"># Current time color.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_TIME_FOREGROUND</span><span class="token operator">=</span><span class="token number">66</span>
  <span class="token comment"># Format for the current time: 09:51:02. See `man 3 strftime`.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_TIME_FORMAT</span><span class="token operator">=</span><span class="token string">'%D{%H:%M:%S}'</span>
  <span class="token comment"># If set to true, time will update when you hit enter. This way prompts for the past</span>
  <span class="token comment"># commands will contain the start times of their commands as opposed to the default</span>
  <span class="token comment"># behavior where they contain the end times of their preceding commands.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_TIME_UPDATE_ON_COMMAND</span><span class="token operator">=</span>false
  <span class="token comment"># Custom icon.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_TIME_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>
  <span class="token comment"># Custom prefix.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_TIME_PREFIX='%246Fat '</span>

  <span class="token comment"># Example of a user-defined prompt segment. Function prompt_example will be called on every</span>
  <span class="token comment"># prompt if `example` prompt segment is added to POWERLEVEL9K_LEFT_PROMPT_ELEMENTS or</span>
  <span class="token comment"># POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS. It displays an icon and orange text greeting the user.</span>
  <span class="token comment">#</span>
  <span class="token comment"># Type `p10k help segment` for documentation and a more sophisticated example.</span>
  <span class="token keyword">function</span> <span class="token function-name function">prompt_example</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    p10k segment <span class="token parameter variable">-f</span> <span class="token number">208</span> <span class="token parameter variable">-i</span> <span class="token string">'⭐'</span> <span class="token parameter variable">-t</span> <span class="token string">'hello, %n'</span>
  <span class="token punctuation">}</span>


  <span class="token keyword">function</span> <span class="token function-name function">prompt_Greeting</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token builtin class-name">local</span> <span class="token assign-left variable">hour</span><span class="token operator">=</span><span class="token variable"><span class="token variable">`</span><span class="token function">date</span> <span class="token string">"+%H"</span><span class="token variable">`</span></span>
    <span class="token builtin class-name">local</span> <span class="token assign-left variable">name</span><span class="token operator">=</span><span class="token string">",king"</span>
    <span class="token keyword">if</span> <span class="token punctuation">[</span> <span class="token variable">$hour</span> <span class="token parameter variable">-lt</span> <span class="token number">12</span> <span class="token parameter variable">-a</span> <span class="token variable">$hour</span> <span class="token parameter variable">-gt</span> <span class="token number">4</span>  <span class="token punctuation">]</span>
    <span class="token keyword">then</span> 
        <span class="token builtin class-name">local</span> <span class="token assign-left variable">str</span><span class="token operator">=</span><span class="token string">"Morning"</span>
    <span class="token keyword">elif</span> <span class="token punctuation">[</span> <span class="token variable">$hour</span> <span class="token parameter variable">-eq</span> <span class="token number">12</span> <span class="token punctuation">]</span>
    <span class="token keyword">then</span>
        <span class="token builtin class-name">local</span> <span class="token assign-left variable">str</span><span class="token operator">=</span><span class="token string">"Noon"</span>
    <span class="token keyword">elif</span> <span class="token punctuation">[</span> <span class="token variable">$hour</span> <span class="token parameter variable">-gt</span> <span class="token number">12</span> <span class="token parameter variable">-a</span> <span class="token variable">$hour</span> <span class="token parameter variable">-lt</span> <span class="token number">19</span> <span class="token punctuation">]</span>                                                                            
    <span class="token keyword">then</span>
        <span class="token builtin class-name">local</span> <span class="token assign-left variable">str</span><span class="token operator">=</span><span class="token string">"Afternoon"</span>
    <span class="token keyword">else</span>
        <span class="token builtin class-name">local</span> <span class="token assign-left variable">str</span><span class="token operator">=</span><span class="token string">"Evening"</span>
    <span class="token keyword">fi</span>
    p10k segment <span class="token parameter variable">-f</span> <span class="token number">208</span> <span class="token parameter variable">-i</span> <span class="token string">'㋡'</span> <span class="token parameter variable">-t</span> <span class="token variable">$str</span><span class="token variable">$name</span> 
  <span class="token punctuation">}</span>

  <span class="token keyword">function</span> <span class="token function-name function">prompt_my_weather</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token function">ping</span> <span class="token parameter variable">-c1</span> <span class="token number">114.114</span>.114.114 <span class="token operator">&amp;&gt;</span> /dev/null
    <span class="token keyword">if</span> <span class="token punctuation">[</span> <span class="token variable">$?</span> <span class="token parameter variable">-eq</span> <span class="token number">0</span> <span class="token punctuation">]</span>
    <span class="token keyword">then</span>
        <span class="token builtin class-name">local</span> <span class="token assign-left variable">weatherDay</span><span class="token operator">=</span><span class="token variable"><span class="token variable">`</span><span class="token function">date</span> <span class="token string">"+%j"</span><span class="token variable">`</span></span>
        <span class="token builtin class-name">local</span> <span class="token assign-left variable">weatherHour</span><span class="token operator">=</span><span class="token variable"><span class="token variable">`</span><span class="token function">date</span> <span class="token string">"+%H"</span><span class="token variable">`</span></span>
        <span class="token builtin class-name">local</span> <span class="token assign-left variable">weatherPath</span><span class="token operator">=</span><span class="token string">"/tmp/"</span>
        <span class="token builtin class-name">local</span> <span class="token assign-left variable">weatherName</span><span class="token operator">=</span><span class="token string">"my_weather"</span>
        <span class="token builtin class-name">local</span> <span class="token assign-left variable">weatherFileType</span><span class="token operator">=</span><span class="token string">".txt"</span>
        <span class="token builtin class-name">local</span> <span class="token assign-left variable">weatherFile</span><span class="token operator">=</span><span class="token variable">$weatherPath</span><span class="token variable">$weatherName</span><span class="token variable">$weatherDay</span><span class="token variable">$weatherHour</span><span class="token variable">$weatherFileType</span>
        <span class="token keyword">if</span> <span class="token punctuation">[</span> <span class="token operator">!</span> <span class="token parameter variable">-e</span> <span class="token variable">$weatherFile</span> <span class="token parameter variable">-o</span> <span class="token operator">!</span> <span class="token parameter variable">-s</span> <span class="token variable">$weatherFile</span> <span class="token punctuation">]</span>
        <span class="token keyword">then</span>
            <span class="token function">touch</span> <span class="token string">"<span class="token variable">$weatherFile</span>"</span>
            <span class="token builtin class-name">local</span> <span class="token assign-left variable">weather</span><span class="token operator">=</span><span class="token variable"><span class="token variable">`</span><span class="token function">curl</span> <span class="token parameter variable">-s</span> <span class="token string">"wttr.in/?format=3 "</span><span class="token variable">`</span></span>
            <span class="token builtin class-name">echo</span> <span class="token variable">$weather</span> <span class="token operator">&gt;</span> <span class="token variable">$weatherFile</span>
        <span class="token keyword">else</span>
            <span class="token builtin class-name">local</span> <span class="token assign-left variable">weather</span><span class="token operator">=</span><span class="token variable"><span class="token variable">$(</span><span class="token function">cat</span> $weatherFile<span class="token variable">)</span></span>
        <span class="token keyword">fi</span>
    <span class="token keyword">else</span>
        <span class="token builtin class-name">local</span> <span class="token assign-left variable">weather</span><span class="token operator">=</span><span class="token string">"无网络"</span>
    <span class="token keyword">fi</span>
    p10k segment <span class="token parameter variable">-f</span> <span class="token string">'#ffb44b'</span> <span class="token parameter variable">-t</span> <span class="token variable">$weather</span>

 <span class="token punctuation">}</span>


  <span class="token comment"># User-defined prompt segments may optionally provide an instant_prompt_* function. Its job</span>
  <span class="token comment"># is to generate the prompt segment for display in instant prompt. See</span>
  <span class="token comment"># https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.</span>
  <span class="token comment">#</span>
  <span class="token comment"># Powerlevel10k will call instant_prompt_* at the same time as the regular prompt_* function</span>
  <span class="token comment"># and will record all `p10k segment` calls it makes. When displaying instant prompt, Powerlevel10k</span>
  <span class="token comment"># will replay these calls without actually calling instant_prompt_*. It is imperative that</span>
  <span class="token comment"># instant_prompt_* always makes the same `p10k segment` calls regardless of environment. If this</span>
  <span class="token comment"># rule is not observed, the content of instant prompt will be incorrect.</span>
  <span class="token comment">#</span>
  <span class="token comment"># Usually, you should either not define instant_prompt_* or simply call prompt_* from it. If</span>
  <span class="token comment"># instant_prompt_* is not defined for a segment, the segment won't be shown in instant prompt.</span>
  <span class="token keyword">function</span> <span class="token function-name function">instant_prompt_example</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token comment"># Since prompt_example always makes the same `p10k segment` calls, we can call it from</span>
    <span class="token comment"># instant_prompt_example. This will give us the same `example` prompt segment in the instant</span>
    <span class="token comment"># and regular prompts.</span>
    prompt_example
  <span class="token punctuation">}</span>

  <span class="token comment"># User-defined prompt segments can be customized the same way as built-in segments.</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_EXAMPLE_FOREGROUND=208</span>
  <span class="token comment"># typeset -g POWERLEVEL9K_EXAMPLE_VISUAL_IDENTIFIER_EXPANSION='⭐'</span>

  <span class="token comment"># Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt</span>
  <span class="token comment"># when accepting a command line. Supported values:</span>
  <span class="token comment">#</span>
  <span class="token comment">#   - off:      Don't change prompt when accepting a command line.</span>
  <span class="token comment">#   - always:   Trim down prompt when accepting a command line.</span>
  <span class="token comment">#   - same-dir: Trim down prompt when accepting a command line unless this is the first command</span>
  <span class="token comment">#               typed after changing current working directory.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_TRANSIENT_PROMPT</span><span class="token operator">=</span>off

  <span class="token comment"># Instant prompt mode.</span>
  <span class="token comment">#</span>
  <span class="token comment">#   - off:     Disable instant prompt. Choose this if you've tried instant prompt and found</span>
  <span class="token comment">#              it incompatible with your zsh configuration files.</span>
  <span class="token comment">#   - quiet:   Enable instant prompt and don't print warnings when detecting console output</span>
  <span class="token comment">#              during zsh initialization. Choose this if you've read and understood</span>
  <span class="token comment">#              https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.</span>
  <span class="token comment">#   - verbose: Enable instant prompt and print a warning when detecting console output during</span>
  <span class="token comment">#              zsh initialization. Choose this if you've never tried instant prompt, haven't</span>
  <span class="token comment">#              seen the warning, or if you are unsure what this all means.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_INSTANT_PROMPT</span><span class="token operator">=</span>quiet

  <span class="token comment"># Hot reload allows you to change POWERLEVEL9K options after Powerlevel10k has been initialized.</span>
  <span class="token comment"># For example, you can type POWERLEVEL9K_BACKGROUND=red and see your prompt turn red. Hot reload</span>
  <span class="token comment"># can slow down prompt by 1-2 milliseconds, so it's better to keep it turned off unless you</span>
  <span class="token comment"># really need it.</span>
  <span class="token builtin class-name">typeset</span> <span class="token parameter variable">-g</span> <span class="token assign-left variable">POWERLEVEL9K_DISABLE_HOT_RELOAD</span><span class="token operator">=</span>true

  <span class="token comment"># If p10k is already loaded, reload configuration.</span>
  <span class="token comment"># This works even with POWERLEVEL9K_DISABLE_HOT_RELOAD=true.</span>
  <span class="token variable"><span class="token punctuation">((</span> <span class="token operator">!</span> $<span class="token operator">+</span>functions[p10k] <span class="token punctuation">))</span></span> <span class="token operator">||</span> p10k reload
<span class="token punctuation">}</span>

<span class="token variable"><span class="token punctuation">((</span> ${#p10k_config_opts} <span class="token punctuation">))</span></span> <span class="token operator">&amp;&amp;</span> setopt <span class="token variable">${p10k_config_opts<span class="token punctuation">[</span>@<span class="token punctuation">]</span>}</span>
<span class="token string">'builtin'</span> <span class="token string">'unset'</span> <span class="token string">'p10k_config_opts'</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<h5 id="终端音乐">终端音乐<a class="anchor" href="#终端音乐">¶</a></h5>
<p>推荐使用<code>ncmpcpp</code>作为前端，<code>mpd</code>作为后端，<code>mpc</code>作为控制端。</p>
<h6 id="全局配置"><s>全局配置</s><a class="anchor" href="#全局配置">¶</a></h6>
<p>打开mpd的配置文件<code>/etc/mpd.conf</code></p>
<p>添加音乐目录</p>
<p>​	将<code>/etc/mpd.conf</code>中添加字段<code>music_directory "/path/to/music"</code>。这里的路径就是音乐存放的绝对路径。</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token comment"># gpasswd -a mpd &lt;your login group&gt;</span>
$ <span class="token function">chmod</span> <span class="token number">710</span> /home/<span class="token operator">&lt;</span>your home dir<span class="token operator">&gt;</span>
gpasswd <span class="token parameter variable">-a</span> mpd audio<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></span></code></pre>
<h6 id="单用户配置">单用户配置<a class="anchor" href="#单用户配置">¶</a></h6>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash">$ <span class="token function">cp</span> /usr/share/doc/mpd/mpdconf.example ~/.config/mpd/mpd.conf<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
<p>编辑 <code>~/.config/mpd/mpd.conf</code> 并且指定所需文件：</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token comment"># Required files</span>
db_file            <span class="token string">"~/.config/mpd/database"</span>
log_file           <span class="token string">"~/.config/mpd/log"</span>

<span class="token comment"># Optional</span>
music_directory    <span class="token string">"~/Music"</span>
playlist_directory <span class="token string">"~/.config/mpd/playlists"</span>
pid_file           <span class="token string">"~/.config/mpd/pid"</span>
state_file         <span class="token string">"~/.config/mpd/state"</span>
sticker_file       <span class="token string">"~/.config/mpd/sticker.sql"</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<p>创建所有上述配置中提及的文件和目录：</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash">$ <span class="token function">mkdir</span> ~/.config/mpd/playlists
$ <span class="token function">touch</span> ~/.config/mpd/<span class="token punctuation">{</span>database,log,pid,state,sticker.sql<span class="token punctuation">}</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span></span></code></pre>
<p>添加如下</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash">audio_output <span class="token punctuation">{</span>
    <span class="token builtin class-name">type</span>        <span class="token string">"alsa"</span>
    name        <span class="token string">"My ALSA Device"</span>
    device      <span class="token string">"hw:0,0"</span>    <span class="token comment"># optional</span>
    mixer_type      <span class="token string">"hardware"</span>  <span class="token comment"># optional</span>
    mixer_device    <span class="token string">"default"</span>   <span class="token comment"># optional</span>
    mixer_control   <span class="token string">"Master"</span>        <span class="token comment"># optional</span>
    mixer_index <span class="token string">"0"</span>     <span class="token comment"># optional</span>
<span class="token punctuation">}</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<p>这里的mixer控制mpd的音量调节。如果不知使用哪一个mixer,可以用<code>amixer</code>进行查看。</p>
<p>ncmpcpp实现可视化需要如下字段：</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash">audio_output <span class="token punctuation">{</span>
    <span class="token builtin class-name">type</span>                    <span class="token string">"fifo"</span>
    name                    <span class="token string">"my_fifo"</span>
    path                    <span class="token string">"/tmp/mpd.fifo"</span>
    <span class="token function">format</span>                  <span class="token string">"44100:16:2"</span>
<span class="token punctuation">}</span>     <span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<p>创建ncmpcpp的配置文件<code>~/.ncmpcpp/config</code>。从<code>/usr/share/doc/ncmpcpp/config</code>复制过来。</p>
<p>创建ncmpcpp的自定义按键的配置文件<code>~/.ncmpcpp/bindings</code>。从<code>/usr/share/doc/ncmpcpp/bindings </code>复制过来。</p>
<hr>
<h5 id="Ranger">Ranger<a class="anchor" href="#Ranger">¶</a></h5>
<h6 id="安装">安装<a class="anchor" href="#安装">¶</a></h6>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token function">sudo</span> pacman <span class="token parameter variable">-S</span> ranger  <span class="token comment">#或者</span>
pip <span class="token function">install</span> ranger-fm <span class="token parameter variable">--user</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span></span></code></pre>
<h6 id="配置">配置<a class="anchor" href="#配置">¶</a></h6>
<h6 id="开启自定义选项">开启自定义选项<a class="anchor" href="#开启自定义选项">¶</a></h6>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash">ranger --copy-config<span class="token operator">=</span>all<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
<p>在环境变量中添加<code>export RANGER_LOAD_DEFAULT_RC=FALSE </code></p>
<h6 id="设置文件图标">设置文件图标<a class="anchor" href="#设置文件图标">¶</a></h6>
<p>首先安装nerd-font,详见下面的字体配置。</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token function">git</span> clone https://github.com/alexanderjeurissen/ranger_devicons ~/.config/ranger/plugins/ranger_devicons<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
<p>添加<code>default_linemode devicons</code> 到 <code>rc.conf</code>。即执行<code>echo "default_linemode devicons" &gt;&gt; $HOME/.config/ranger/rc.conf</code></p>
<p><s>若是不行，就在这个插件的文件夹下面<code>make install</code>。</s></p>
<h6 id="开启图片预览">开启图片预览<a class="anchor" href="#开启图片预览">¶</a></h6>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token function">sudo</span> pacman <span class="token parameter variable">-S</span> w3m <span class="token comment">#提供显示图像的组件</span><span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
<p>在<code>rc.conf</code>中添加：</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token builtin class-name">set</span> preview_images <span class="token boolean">true</span> 
<span class="token comment"># Be aware of version control systems and display information.将这里改成true,可以显示github目录的状态</span>
<span class="token builtin class-name">set</span> vcs_aware <span class="token boolean">true</span>  <span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></span></code></pre>
<p>查看图片：</p>
<p><code>sudo pacman -S w3m</code></p>
<p>编辑配置文件<code>~/.config/ranger/rc.conf</code></p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token comment"># Use one of the supported image preview protocols</span>
<span class="token builtin class-name">set</span> preview_images <span class="token boolean">true</span> 
<span class="token builtin class-name">set</span> preview_images_method w3m<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></span></code></pre>
<p>在<code>～/.config/ranger/scope.sh</code>中，将相关格式代码的注释取消。</p>
<p>视频预览需要安装ffmpegthumbnailer。</p>
<p>docx预览需要安装pandoc。</p>
<h6 id="设置自定义的命令（压缩，mkcd，解压，fzf）">设置自定义的命令（压缩，mkcd，解压，fzf）<a class="anchor" href="#设置自定义的命令（压缩，mkcd，解压，fzf）">¶</a></h6>
<p>在<code>commands.py</code>文件中添加如下代码：</p>
<pre class="line-numbers language-python" data-language="python"><code class="language-python"><span class="token keyword">from</span> ranger<span class="token punctuation">.</span>core<span class="token punctuation">.</span>loader <span class="token keyword">import</span> CommandLoader
<span class="token keyword">class</span> <span class="token class-name">mkcd</span><span class="token punctuation">(</span>Command<span class="token punctuation">)</span><span class="token punctuation">:</span>
    <span class="token triple-quoted-string string">"""
    :mkcd &lt;dirname&gt;
    Creates a directory with the name &lt;dirname&gt; and enters it.
    """</span>

    <span class="token keyword">def</span> <span class="token function">execute</span><span class="token punctuation">(</span>self<span class="token punctuation">)</span><span class="token punctuation">:</span>
        <span class="token keyword">from</span> os<span class="token punctuation">.</span>path <span class="token keyword">import</span> join<span class="token punctuation">,</span> expanduser<span class="token punctuation">,</span> lexists
        <span class="token keyword">from</span> os <span class="token keyword">import</span> makedirs
        <span class="token keyword">import</span> re

        dirname <span class="token operator">=</span> join<span class="token punctuation">(</span>self<span class="token punctuation">.</span>fm<span class="token punctuation">.</span>thisdir<span class="token punctuation">.</span>path<span class="token punctuation">,</span> expanduser<span class="token punctuation">(</span>self<span class="token punctuation">.</span>rest<span class="token punctuation">(</span><span class="token number">1</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
        <span class="token keyword">if</span> <span class="token keyword">not</span> lexists<span class="token punctuation">(</span>dirname<span class="token punctuation">)</span><span class="token punctuation">:</span>
            makedirs<span class="token punctuation">(</span>dirname<span class="token punctuation">)</span>

            <span class="token keyword">match</span> <span class="token operator">=</span> re<span class="token punctuation">.</span>search<span class="token punctuation">(</span><span class="token string">'^/|^~[^/]*/'</span><span class="token punctuation">,</span> dirname<span class="token punctuation">)</span>
            <span class="token keyword">if</span> <span class="token keyword">match</span><span class="token punctuation">:</span>
                self<span class="token punctuation">.</span>fm<span class="token punctuation">.</span>cd<span class="token punctuation">(</span><span class="token keyword">match</span><span class="token punctuation">.</span>group<span class="token punctuation">(</span><span class="token number">0</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
                dirname <span class="token operator">=</span> dirname<span class="token punctuation">[</span><span class="token keyword">match</span><span class="token punctuation">.</span>end<span class="token punctuation">(</span><span class="token number">0</span><span class="token punctuation">)</span><span class="token punctuation">:</span><span class="token punctuation">]</span>

            <span class="token keyword">for</span> m <span class="token keyword">in</span> re<span class="token punctuation">.</span>finditer<span class="token punctuation">(</span><span class="token string">'[^/]+'</span><span class="token punctuation">,</span> dirname<span class="token punctuation">)</span><span class="token punctuation">:</span>
                s <span class="token operator">=</span> m<span class="token punctuation">.</span>group<span class="token punctuation">(</span><span class="token number">0</span><span class="token punctuation">)</span>
                <span class="token keyword">if</span> s <span class="token operator">==</span> <span class="token string">'..'</span> <span class="token keyword">or</span> <span class="token punctuation">(</span>s<span class="token punctuation">.</span>startswith<span class="token punctuation">(</span><span class="token string">'.'</span><span class="token punctuation">)</span> <span class="token keyword">and</span> <span class="token keyword">not</span> self<span class="token punctuation">.</span>fm<span class="token punctuation">.</span>settings<span class="token punctuation">[</span><span class="token string">'show_hidden'</span><span class="token punctuation">]</span><span class="token punctuation">)</span><span class="token punctuation">:</span>
                    self<span class="token punctuation">.</span>fm<span class="token punctuation">.</span>cd<span class="token punctuation">(</span>s<span class="token punctuation">)</span>
                <span class="token keyword">else</span><span class="token punctuation">:</span>
                    <span class="token comment">## We force ranger to load content before calling `scout`.</span>
                    self<span class="token punctuation">.</span>fm<span class="token punctuation">.</span>thisdir<span class="token punctuation">.</span>load_content<span class="token punctuation">(</span>schedule<span class="token operator">=</span><span class="token boolean">False</span><span class="token punctuation">)</span>
                    self<span class="token punctuation">.</span>fm<span class="token punctuation">.</span>execute_console<span class="token punctuation">(</span><span class="token string">'scout -ae ^{}$'</span><span class="token punctuation">.</span><span class="token builtin">format</span><span class="token punctuation">(</span>s<span class="token punctuation">)</span><span class="token punctuation">)</span>
        <span class="token keyword">else</span><span class="token punctuation">:</span>
            self<span class="token punctuation">.</span>fm<span class="token punctuation">.</span>notify<span class="token punctuation">(</span><span class="token string">"file/directory exists!"</span><span class="token punctuation">,</span> bad<span class="token operator">=</span><span class="token boolean">True</span><span class="token punctuation">)</span>

<span class="token keyword">class</span> <span class="token class-name">fzf_select</span><span class="token punctuation">(</span>Command<span class="token punctuation">)</span><span class="token punctuation">:</span>
    <span class="token triple-quoted-string string">"""
    记得安装一下fzf:sudo pacman -S fzf
    :fzf_select
    Find a file using fzf.
    With a prefix argument select only directories.
    See: https://github.com/junegunn/fzf
    """</span>
    <span class="token keyword">def</span> <span class="token function">execute</span><span class="token punctuation">(</span>self<span class="token punctuation">)</span><span class="token punctuation">:</span>
        <span class="token keyword">import</span> subprocess
        <span class="token keyword">import</span> os<span class="token punctuation">.</span>path
        <span class="token keyword">if</span> self<span class="token punctuation">.</span>quantifier<span class="token punctuation">:</span>
            <span class="token comment"># match only directories</span>
            command<span class="token operator">=</span>"find <span class="token operator">-</span>L <span class="token punctuation">.</span> \<span class="token punctuation">(</span> <span class="token operator">-</span>path <span class="token string">'*/\.*'</span> <span class="token operator">-</span>o <span class="token operator">-</span>fstype <span class="token string">'dev'</span> <span class="token operator">-</span>o <span class="token operator">-</span>fstype <span class="token string">'proc'</span> \<span class="token punctuation">)</span> <span class="token operator">-</span>prune \
            <span class="token operator">-</span>o <span class="token operator">-</span><span class="token builtin">type</span> d <span class="token operator">-</span><span class="token keyword">print</span> <span class="token number">2</span><span class="token operator">&gt;</span> <span class="token operator">/</span>dev<span class="token operator">/</span>null <span class="token operator">|</span> sed 1d <span class="token operator">|</span> cut <span class="token operator">-</span>b3<span class="token operator">-</span> <span class="token operator">|</span> fzf <span class="token operator">+</span>m"
        <span class="token keyword">else</span><span class="token punctuation">:</span>
            <span class="token comment"># match files and directories</span>
            command<span class="token operator">=</span>"find <span class="token operator">-</span>L <span class="token punctuation">.</span> \<span class="token punctuation">(</span> <span class="token operator">-</span>path <span class="token string">'*/\.*'</span> <span class="token operator">-</span>o <span class="token operator">-</span>fstype <span class="token string">'dev'</span> <span class="token operator">-</span>o <span class="token operator">-</span>fstype <span class="token string">'proc'</span> \<span class="token punctuation">)</span> <span class="token operator">-</span>prune \
            <span class="token operator">-</span>o <span class="token operator">-</span><span class="token keyword">print</span> <span class="token number">2</span><span class="token operator">&gt;</span> <span class="token operator">/</span>dev<span class="token operator">/</span>null <span class="token operator">|</span> sed 1d <span class="token operator">|</span> cut <span class="token operator">-</span>b3<span class="token operator">-</span> <span class="token operator">|</span> fzf <span class="token operator">+</span>m"
        fzf <span class="token operator">=</span> self<span class="token punctuation">.</span>fm<span class="token punctuation">.</span>execute_command<span class="token punctuation">(</span>command<span class="token punctuation">,</span> universal_newlines<span class="token operator">=</span><span class="token boolean">True</span><span class="token punctuation">,</span> stdout<span class="token operator">=</span>subprocess<span class="token punctuation">.</span>PIPE<span class="token punctuation">)</span>
        stdout<span class="token punctuation">,</span> stderr <span class="token operator">=</span> fzf<span class="token punctuation">.</span>communicate<span class="token punctuation">(</span><span class="token punctuation">)</span>
        <span class="token keyword">if</span> fzf<span class="token punctuation">.</span>returncode <span class="token operator">==</span> <span class="token number">0</span><span class="token punctuation">:</span>
            fzf_file <span class="token operator">=</span> os<span class="token punctuation">.</span>path<span class="token punctuation">.</span>abspath<span class="token punctuation">(</span>stdout<span class="token punctuation">.</span>rstrip<span class="token punctuation">(</span><span class="token string">'\n'</span><span class="token punctuation">)</span><span class="token punctuation">)</span>
            <span class="token keyword">if</span> os<span class="token punctuation">.</span>path<span class="token punctuation">.</span>isdir<span class="token punctuation">(</span>fzf_file<span class="token punctuation">)</span><span class="token punctuation">:</span>
                self<span class="token punctuation">.</span>fm<span class="token punctuation">.</span>cd<span class="token punctuation">(</span>fzf_file<span class="token punctuation">)</span>
            <span class="token keyword">else</span><span class="token punctuation">:</span>
                self<span class="token punctuation">.</span>fm<span class="token punctuation">.</span>select_file<span class="token punctuation">(</span>fzf_file<span class="token punctuation">)</span>




<span class="token keyword">class</span> <span class="token class-name">compress</span><span class="token punctuation">(</span>Command<span class="token punctuation">)</span><span class="token punctuation">:</span>
    <span class="token keyword">def</span> <span class="token function">execute</span><span class="token punctuation">(</span>self<span class="token punctuation">)</span><span class="token punctuation">:</span>
        <span class="token triple-quoted-string string">""" Compress marked files to current directory """</span>
        cwd <span class="token operator">=</span> self<span class="token punctuation">.</span>fm<span class="token punctuation">.</span>thisdir
        marked_files <span class="token operator">=</span> cwd<span class="token punctuation">.</span>get_selection<span class="token punctuation">(</span><span class="token punctuation">)</span>

        <span class="token keyword">if</span> <span class="token keyword">not</span> marked_files<span class="token punctuation">:</span>
            <span class="token keyword">return</span>

        <span class="token keyword">def</span> <span class="token function">refresh</span><span class="token punctuation">(</span>_<span class="token punctuation">)</span><span class="token punctuation">:</span>
            cwd <span class="token operator">=</span> self<span class="token punctuation">.</span>fm<span class="token punctuation">.</span>get_directory<span class="token punctuation">(</span>original_path<span class="token punctuation">)</span>
            cwd<span class="token punctuation">.</span>load_content<span class="token punctuation">(</span><span class="token punctuation">)</span>

        original_path <span class="token operator">=</span> cwd<span class="token punctuation">.</span>path
        parts <span class="token operator">=</span> self<span class="token punctuation">.</span>line<span class="token punctuation">.</span>split<span class="token punctuation">(</span><span class="token punctuation">)</span>
        au_flags <span class="token operator">=</span> parts<span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">:</span><span class="token punctuation">]</span>

        descr <span class="token operator">=</span> <span class="token string">"compressing files in: "</span> <span class="token operator">+</span> os<span class="token punctuation">.</span>path<span class="token punctuation">.</span>basename<span class="token punctuation">(</span>parts<span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span><span class="token punctuation">)</span>
        obj <span class="token operator">=</span> CommandLoader<span class="token punctuation">(</span>args<span class="token operator">=</span><span class="token punctuation">[</span><span class="token string">'apack'</span><span class="token punctuation">]</span> <span class="token operator">+</span> au_flags <span class="token operator">+</span> \
                <span class="token punctuation">[</span>os<span class="token punctuation">.</span>path<span class="token punctuation">.</span>relpath<span class="token punctuation">(</span>f<span class="token punctuation">.</span>path<span class="token punctuation">,</span> cwd<span class="token punctuation">.</span>path<span class="token punctuation">)</span> <span class="token keyword">for</span> f <span class="token keyword">in</span> marked_files<span class="token punctuation">]</span><span class="token punctuation">,</span> descr<span class="token operator">=</span>descr<span class="token punctuation">,</span> read<span class="token operator">=</span><span class="token boolean">True</span><span class="token punctuation">)</span>

        obj<span class="token punctuation">.</span>signal_bind<span class="token punctuation">(</span><span class="token string">'after'</span><span class="token punctuation">,</span> refresh<span class="token punctuation">)</span>
        self<span class="token punctuation">.</span>fm<span class="token punctuation">.</span>loader<span class="token punctuation">.</span>add<span class="token punctuation">(</span>obj<span class="token punctuation">)</span>

    <span class="token keyword">def</span> <span class="token function">tab</span><span class="token punctuation">(</span>self<span class="token punctuation">,</span> tabnum<span class="token punctuation">)</span><span class="token punctuation">:</span>
        <span class="token triple-quoted-string string">""" Complete with current folder name """</span>

        extension <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token string">'.zip'</span><span class="token punctuation">,</span> <span class="token string">'.tar.gz'</span><span class="token punctuation">,</span> <span class="token string">'.rar'</span><span class="token punctuation">,</span> <span class="token string">'.7z'</span><span class="token punctuation">]</span>
        <span class="token keyword">return</span> <span class="token punctuation">[</span><span class="token string">'compress '</span> <span class="token operator">+</span> os<span class="token punctuation">.</span>path<span class="token punctuation">.</span>basename<span class="token punctuation">(</span>self<span class="token punctuation">.</span>fm<span class="token punctuation">.</span>thisdir<span class="token punctuation">.</span>path<span class="token punctuation">)</span> <span class="token operator">+</span> ext <span class="token keyword">for</span> ext <span class="token keyword">in</span> extension<span class="token punctuation">]</span>

<span class="token keyword">class</span> <span class="token class-name">extracthere</span><span class="token punctuation">(</span>Command<span class="token punctuation">)</span><span class="token punctuation">:</span>
    <span class="token keyword">def</span> <span class="token function">execute</span><span class="token punctuation">(</span>self<span class="token punctuation">)</span><span class="token punctuation">:</span>
        <span class="token triple-quoted-string string">""" Extract copied files to current directory """</span>
        copied_files <span class="token operator">=</span> <span class="token builtin">tuple</span><span class="token punctuation">(</span>self<span class="token punctuation">.</span>fm<span class="token punctuation">.</span>copy_buffer<span class="token punctuation">)</span>

        <span class="token keyword">if</span> <span class="token keyword">not</span> copied_files<span class="token punctuation">:</span>
            <span class="token keyword">return</span>

        <span class="token keyword">def</span> <span class="token function">refresh</span><span class="token punctuation">(</span>_<span class="token punctuation">)</span><span class="token punctuation">:</span>
            cwd <span class="token operator">=</span> self<span class="token punctuation">.</span>fm<span class="token punctuation">.</span>get_directory<span class="token punctuation">(</span>original_path<span class="token punctuation">)</span>
            cwd<span class="token punctuation">.</span>load_content<span class="token punctuation">(</span><span class="token punctuation">)</span>

        one_file <span class="token operator">=</span> copied_files<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span>
        cwd <span class="token operator">=</span> self<span class="token punctuation">.</span>fm<span class="token punctuation">.</span>thisdir
        original_path <span class="token operator">=</span> cwd<span class="token punctuation">.</span>path
        au_flags <span class="token operator">=</span> <span class="token punctuation">[</span><span class="token string">'-X'</span><span class="token punctuation">,</span> cwd<span class="token punctuation">.</span>path<span class="token punctuation">]</span>
        au_flags <span class="token operator">+=</span> self<span class="token punctuation">.</span>line<span class="token punctuation">.</span>split<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">:</span><span class="token punctuation">]</span>
        au_flags <span class="token operator">+=</span> <span class="token punctuation">[</span><span class="token string">'-e'</span><span class="token punctuation">]</span>

        self<span class="token punctuation">.</span>fm<span class="token punctuation">.</span>copy_buffer<span class="token punctuation">.</span>clear<span class="token punctuation">(</span><span class="token punctuation">)</span>
        self<span class="token punctuation">.</span>fm<span class="token punctuation">.</span>cut_buffer <span class="token operator">=</span> <span class="token boolean">False</span>
        <span class="token keyword">if</span> <span class="token builtin">len</span><span class="token punctuation">(</span>copied_files<span class="token punctuation">)</span> <span class="token operator">==</span> <span class="token number">1</span><span class="token punctuation">:</span>
            descr <span class="token operator">=</span> <span class="token string">"extracting: "</span> <span class="token operator">+</span> os<span class="token punctuation">.</span>path<span class="token punctuation">.</span>basename<span class="token punctuation">(</span>one_file<span class="token punctuation">.</span>path<span class="token punctuation">)</span>
        <span class="token keyword">else</span><span class="token punctuation">:</span>
            descr <span class="token operator">=</span> <span class="token string">"extracting files from: "</span> <span class="token operator">+</span> os<span class="token punctuation">.</span>path<span class="token punctuation">.</span>basename<span class="token punctuation">(</span>one_file<span class="token punctuation">.</span>dirname<span class="token punctuation">)</span>
        obj <span class="token operator">=</span> CommandLoader<span class="token punctuation">(</span>args<span class="token operator">=</span><span class="token punctuation">[</span><span class="token string">'aunpack'</span><span class="token punctuation">]</span> <span class="token operator">+</span> au_flags \
                <span class="token operator">+</span> <span class="token punctuation">[</span>f<span class="token punctuation">.</span>path <span class="token keyword">for</span> f <span class="token keyword">in</span> copied_files<span class="token punctuation">]</span><span class="token punctuation">,</span> descr<span class="token operator">=</span>descr<span class="token punctuation">,</span> read<span class="token operator">=</span><span class="token boolean">True</span><span class="token punctuation">)</span>

        obj<span class="token punctuation">.</span>signal_bind<span class="token punctuation">(</span><span class="token string">'after'</span><span class="token punctuation">,</span> refresh<span class="token punctuation">)</span>
        self<span class="token punctuation">.</span>fm<span class="token punctuation">.</span>loader<span class="token punctuation">.</span>add<span class="token punctuation">(</span>obj<span class="token punctuation">)</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<h5 id="Latex">Latex<a class="anchor" href="#Latex">¶</a></h5>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token function">sudo</span> pacman <span class="token parameter variable">-S</span> texstudio
<span class="token function">sudo</span> pacman <span class="token parameter variable">-S</span> texlive-core  texlive-bin texlive-langcjk texlive-latex3 texlive-latexextra texlive-langchinese
<span class="token function">sudo</span> pacman <span class="token parameter variable">-S</span> texlive-most<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></span></code></pre>
<p>中文latex最简化模板</p>
<pre class="line-numbers language-latex" data-language="latex"><code class="language-latex"><span class="token comment">%!TEX program = xelatex</span>
<span class="token function selector">\documentclass</span><span class="token punctuation">[</span><span class="token punctuation">]</span><span class="token punctuation">{</span>article<span class="token punctuation">}</span>
<span class="token function selector">\usepackage</span><span class="token punctuation">{</span><span class="token keyword">ctex</span><span class="token punctuation">}</span>
<span class="token function selector">\title</span><span class="token punctuation">{</span><span class="token punctuation">}</span>
<span class="token function selector">\author</span><span class="token punctuation">{</span><span class="token punctuation">}</span>

<span class="token function selector">\begin</span><span class="token punctuation">{</span><span class="token keyword">document</span><span class="token punctuation">}</span>

<span class="token function selector">\maketitle</span>

<span class="token function selector">\begin</span><span class="token punctuation">{</span><span class="token keyword">abstract</span><span class="token punctuation">}</span>
	Hello World <span class="token function selector">\\</span>
	你好，世界 <span class="token function selector">\\</span>

<span class="token function selector">\end</span><span class="token punctuation">{</span><span class="token keyword">abstract</span><span class="token punctuation">}</span>
 
<span class="token function selector">\section</span><span class="token punctuation">{</span><span class="token punctuation">}</span>

<span class="token function selector">\end</span><span class="token punctuation">{</span><span class="token keyword">document</span><span class="token punctuation">}</span>
<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<hr>
<h4 id="yay安装">yay安装<a class="anchor" href="#yay安装">¶</a></h4>
<h5 id="Java">Java<a class="anchor" href="#Java">¶</a></h5>
<p>yay jdk15 和yay jdk8</p>
<p>若是需要安装jdk8，则先下载相应版本的jdk包到默认的下载文件夹。然后执行<code>yay jdk8</code>即可。</p>
<p><code>archlinux-java status</code>查看当前使用的JDK版本</p>
<p>easyconnect: yay easyconnect</p>
<p>burpsuite: yay burpsuite</p>
<p>gotop：一款命令行查看系统使用状况</p>
<p>bashtop:同上</p>
<p>termius：多平台终端软件</p>
<p>yay -S picgo-appimage:picgo图片上传工具</p>
<p><a target="_blank" rel="noopener" href="https://www.archlinux.org/packages/community/x86_64/zathura-pdf-mupdf/"> zathura-pdf-mupdf</a>：zathura的pdf支持插件</p>
<p>the_silver_searcher：</p>
<p>touchegg：触控板程序，创建开机自启可以使用"/usr/bin/touchegg --daemon &amp; /usr/bin/touchegg --client"</p>
<p>logiops：罗技MX系列鼠标在linux下的驱动</p>
<h4 id="Appimage形式存在的软件">Appimage形式存在的软件<a class="anchor" href="#Appimage形式存在的软件">¶</a></h4>
<p>pdman：数据库设计软件</p>
<hr>
<h3 id="配置-2">配置<a class="anchor" href="#配置-2">¶</a></h3>
<h4 id="终端代理">终端代理<a class="anchor" href="#终端代理">¶</a></h4>
<p><strong>Http代理</strong></p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token builtin class-name">export</span> <span class="token assign-left variable">http_proxy</span><span class="token operator">=</span><span class="token string">"http://localhost:port"</span>
<span class="token builtin class-name">export</span> <span class="token assign-left variable">https_proxy</span><span class="token operator">=</span><span class="token string">"http://localhost:port"</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span></span></code></pre>
<p><strong>Socket5</strong></p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token builtin class-name">export</span> <span class="token assign-left variable">http_proxy</span><span class="token operator">=</span><span class="token string">"socks5://127.0.0.1:1080"</span>
<span class="token builtin class-name">export</span> <span class="token assign-left variable">https_proxy</span><span class="token operator">=</span><span class="token string">"socks5://127.0.0.1:1080"</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span></span></code></pre>
<h4 id="ArchLinuxCN源">ArchLinuxCN源<a class="anchor" href="#ArchLinuxCN源">¶</a></h4>
<p>在/etc/pacman.conf文件中添加以下两行</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token punctuation">[</span>archlinuxcn<span class="token punctuation">]</span>
Server <span class="token operator">=</span> https://repo.archlinuxcn.org/<span class="token variable">$arch</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span></span></code></pre>
<p>或者去<a target="_blank" rel="noopener" href="https://github.com/archlinuxcn/mirrorlist-repo">官方</a>获取镜像站点。</p>
<h4 id="BlackArch源">BlackArch源<a class="anchor" href="#BlackArch源">¶</a></h4>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token punctuation">[</span>blackarch<span class="token punctuation">]</span>
SigLevel <span class="token operator">=</span> Optional TrustAll
Server <span class="token operator">=</span> https://mirrors.ustc.edu.cn/blackarch/<span class="token variable">$repo</span>/os/<span class="token variable">$arch</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></span></code></pre>
<h4 id="桌面毛玻璃">桌面毛玻璃<a class="anchor" href="#桌面毛玻璃">¶</a></h4>
<p><a target="_blank" rel="noopener" href="https://www.youtube.com/watch?v=86ro5Q0Fi34">主题配置</a></p>
<h6 id="终端模糊">终端模糊<a class="anchor" href="#终端模糊">¶</a></h6>
<p>修改<code>.config/yakuakerc</code>，修改成:</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token punctuation">[</span>Appearance<span class="token punctuation">]</span>
<span class="token assign-left variable">Blur</span><span class="token operator">=</span>true
<span class="token assign-left variable">Translucency</span><span class="token operator">=</span>true                                                                                                                                                            

<span class="token punctuation">[</span>Favorite Profiles<span class="token punctuation">]</span>
<span class="token assign-left variable">Favorites</span><span class="token operator">=</span>

<span class="token punctuation">[</span>Window<span class="token punctuation">]</span>
<span class="token assign-left variable">Height</span><span class="token operator">=</span><span class="token number">100</span>
<span class="token assign-left variable">KeepOpen</span><span class="token operator">=</span>false
<span class="token assign-left variable">Width</span><span class="token operator">=</span><span class="token number">100</span><span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<p>konsole的毛玻璃特效在外观-&gt;配色方法和字体中的背景透明度。</p>
<h4 id="字体">字体<a class="anchor" href="#字体">¶</a></h4>
<p>nerd-fonts-hack ttf-meslo-nerd-font-powerlevel10k nerd-fonts-jetbrains-mono ttf-nerd-fonts-hack-complete-git</p>
<p>重点推荐<code>nerd-fonts-jetbrains-mono</code>。挺好的。</p>
<p>中文字体：<strong>yay</strong> -S wqy-bitmapfont wqy-microhei wqy-microhei-lite wqy-zenhei adobe-source-han-mono-cn-fonts adobe-source
-han-sans-cn-fonts adobe-source-han-serif-cn-fonts</p>
<h4 id="安全软件">安全软件<a class="anchor" href="#安全软件">¶</a></h4>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token function">sudo</span> pacman <span class="token parameter variable">-S</span> john
<span class="token function">sudo</span> pacman <span class="token parameter variable">-S</span> hydra
<span class="token function">sudo</span> pacman <span class="token parameter variable">-S</span> nmap
<span class="token function">sudo</span> pacman <span class="token parameter variable">-S</span> bettercap
<span class="token function">sudo</span> pacman <span class="token parameter variable">-S</span> exploitdb
<span class="token function">sudo</span> pacman <span class="token parameter variable">-S</span> metasploit
<span class="token function">sudo</span> pacman <span class="token parameter variable">-S</span> hashcat
<span class="token function">sudo</span> pacman <span class="token parameter variable">-S</span> nikto
<span class="token function">sudo</span> pacman <span class="token parameter variable">-S</span> lynis
yay <span class="token parameter variable">-S</span> dirb
yay <span class="token parameter variable">-S</span> edb-debugger
yay <span class="token parameter variable">-S</span> halcyon
yay <span class="token parameter variable">-S</span> charles
yay <span class="token parameter variable">-S</span> maltego<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
<h4 id="开机蓝牙自启">开机蓝牙自启<a class="anchor" href="#开机蓝牙自启">¶</a></h4>
<p>实现登陆前可以使用蓝牙键盘。</p>
<p>修改<code>/etc/bluetooth/main.conf</code>，修改如下字段：</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token punctuation">[</span>Policy<span class="token punctuation">]</span>
AutoEnable-true<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span></span></code></pre>
<h3 id="更新错误">更新错误<a class="anchor" href="#更新错误">¶</a></h3>
<h4 id="下载出现依赖关系的错误">下载出现依赖关系的错误<a class="anchor" href="#下载出现依赖关系的错误">¶</a></h4>
<p>推荐去官网的公告区查看最新信息。</p>
<p><a target="_blank" rel="noopener" href="https://forum.manjaro.org/c/announcements/11">https://forum.manjaro.org/c/announcements/11</a></p>
<h4 id="包错误或损坏">包错误或损坏<a class="anchor" href="#包错误或损坏">¶</a></h4>
<p>首先自然是重新下载。但是顺利下载下来的内容依旧是损坏或错误，此时推荐使用<code>sudo pacman -S archlinuxcn-keyring</code>。</p>
<h3 id="罗技驱动">罗技驱动<a class="anchor" href="#罗技驱动">¶</a></h3>
<p>罗技的MX系列鼠标没有板载内存，只能通过读取软件中设置的方式来实现按键自定义。因此，需要在Linux下也安装相应的驱动才能正常使用。详情见<a target="_blank" rel="noopener" href="https://wiki.archlinux.org/title/Logitech_MX_Master">https://wiki.archlinux.org/title/Logitech_MX_Master</a></p>
<ol>
<li>
<p><code>yay -s logiops</code>安装驱动。</p>
</li>
<li>
<p>启动服务<code>systemctl start logid</code></p>
</li>
<li>
<p>使用命令<code>sudo logid -v</code>获取设备的名称。</p>
</li>
<li>
<p>编写配置文件<code>/etc/logid.cfg</code></p>
<pre class="line-numbers language-markup" data-language="markup"><code class="language-markup">devices: (
{
    name: "Wireless Mouse MX Master 3";
    buttons: (
        {
            # 鼠标侧键的下键
            cid: 0x53;
            action =
            {
                type: "Keypress";
                keys: ["KEY_F12"];
            };
        },
        {
            # 鼠标侧键的上键
            cid: 0x56;
            action =
            {
                type :  "Keypress";
                keys: ["KEY_LEFTALT", "KEY_L"];
            };
        }
    );
}
);<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span><span></span></span></code></pre>
</li>
</ol>
<h3 id="Navicat15">Navicat15<a class="anchor" href="#Navicat15">¶</a></h3>
<ol>
<li>
<p>首先下载navicat15的软件包。<code>wget https://github.com/HeQuanX/navicat-keygen-tools/releases/download/recommended/navicat15-premium-cs.zip</code></p>
</li>
<li>
<p>提取Appimage文件中的内容到指定文件夹中</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token function">mkdir</span> navicat15-premium-cs
<span class="token function">sudo</span> <span class="token function">mount</span> <span class="token parameter variable">-o</span> loop navicat15-premium-cs.AppImage navicat15-premium-cs
<span class="token function">sudo</span> <span class="token function">cp</span> <span class="token parameter variable">-r</span> navicat15-premium-cs navicat
<span class="token function">sudo</span> <span class="token function">umount</span> navicat15-premium-cs
<span class="token function">rm</span> <span class="token parameter variable">-rf</span> navicat15-premium-cs<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span><span></span><span></span></span></code></pre>
</li>
<li>
<p>安装编译依赖软件</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash">yay <span class="token parameter variable">-S</span> capstone keystone rapidjson openssl<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
</li>
<li>
<p>编译生成补丁文件</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token function">git</span> clone <span class="token parameter variable">-b</span> linux --single-branch https://github.com/Orginly/navicat-keygen.git
<span class="token builtin class-name">cd</span> navicat-keygen
<span class="token function">make</span> all<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></span></code></pre>
<p><strong>生成完成后，你会在 <code>./bin</code> 文件夹下看到编译后的keygen/patcher。</strong></p>
</li>
<li>
<p>navicat-patcher 替换官方公钥</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token function">sudo</span> ./bin/navicat-patcher <span class="token punctuation">..</span>/navicat<span aria-hidden="true" class="line-numbers-rows"><span></span></span></code></pre>
</li>
<li>
<p>重新打包成AppImage文件</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash">yay <span class="token parameter variable">-S</span> appimagetool
appimagetool navicat navicat15.AppImage
./navicat15.AppImage<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></span></code></pre>
</li>
<li>
<p>激活</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token builtin class-name">cd</span> navicat-keygen
./bin/navicat-keygen <span class="token parameter variable">--text</span> ./RegPrivateKey.pem<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span></span></code></pre>
<p>在这里输入请求码，并复制生成的激活码。此过程中记得断网，使用手动激活的方式。</p>
</li>
<li>
<p>清理</p>
<pre class="line-numbers language-bash" data-language="bash"><code class="language-bash"><span class="token function">sudo</span> <span class="token function">rm</span> <span class="token parameter variable">-rf</span> navicat15-premium-cs
<span class="token function">sudo</span> <span class="token function">rm</span> <span class="token parameter variable">-rf</span> navicat15-premium-cs.AppImage
<span class="token function">sudo</span> <span class="token function">rm</span> <span class="token parameter variable">-rf</span> navicat<span aria-hidden="true" class="line-numbers-rows"><span></span><span></span><span></span></span></code></pre>
</li>
</ol>
<h3 id="Manjaro与Win双系统蓝牙">Manjaro与Win双系统蓝牙<a class="anchor" href="#Manjaro与Win双系统蓝牙">¶</a></h3>
<h4 id="普通蓝牙设备">普通蓝牙设备<a class="anchor" href="#普通蓝牙设备">¶</a></h4>
<ol>
<li>
<p>在win10下建立与蓝牙设备的连接，以保证win中的系统注册表中有该设备配置项。</p>
</li>
<li>
<p>切换到Manjaro下，再次设备配对。</p>
</li>
<li>
<p>获取Manjaro系统下蓝牙设备的linkkey或设备认证码。路径在<code>/var/lib/bluetooth</code>下。里面的第一层文件夹是本机蓝牙的mac地址，再里面的文件夹就是每个与电脑配对的蓝牙设备的mac地址。找到相应设备的mac地址文件夹，其中info文件就记录着设备的linkkey。</p>
<p><img src="http://www.linuxdiyf.com/linux/uploads/allimg/170311/2-1F311100530443.png" alt=""></p>
</li>
<li>
<p>切换到win系统下，通过<a target="_blank" rel="noopener" href="https://technet.microsoft.com/en-us/sysinternals/bb897553">微软官网</a>下载PSTools工具修改系统注册表中的蓝牙linkkey。在命令行程序中执行<code>PsExec.exe -s -i regedit</code>。</p>
</li>
<li>
<p>找到<code>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\BTHPORT\Parameters\Keys\</code>。将Manjaro下获取的key输入进去。重启电脑即可。</p>
<p><img src="http://www.linuxdiyf.com/linux/uploads/allimg/170311/2-1F311100555c6.png" alt="win10和ubuntu16共用蓝牙鼠标"></p>
</li>
</ol>
<h4 id="罗技Master3">罗技Master3<a class="anchor" href="#罗技Master3">¶</a></h4>
<p>罗技的Master3不同于一般的蓝牙设备。<strong>每次配对都会导致鼠标自身的mac地址自增(即+2)</strong>，因此在修改时需要将Manjaro下的mac地址文件夹名字进行修改。</p>
<ol>
<li>将鼠标在Manjaro系统下进行配对。完成后可以在<code>/var/lib/bluetooth/主机蓝牙设备地址/鼠标蓝牙设备地址</code> 下看到配对信息，在 info 中就存有配对验证使用的 <code>IdentityResolvingKey</code> 和 <code>SlaveLongTermKey</code> 。</li>
<li>同普通蓝牙设备，在win系统中配对设备并通过PSTools工具获取设备当前的<code>Address(设备地址)</code>、<code>IRK(IdentityResolvingKey)</code> 和 <code>LTK(SlaveLongTermKey)</code>。</li>
<li>进入Manjaro系统，将设备mac文件夹修改成现在自增后的mac地址，并将info中的<code>IdentityResolvingKey和SlaveLongTermKey</code>修改成和win下一致的数据。</li>
<li>重启系统即可。</li>
</ol>

                
            </div>
            <hr/>

            

    <div class="reprint" id="reprint-statement">
        
            <div class="reprint__author">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-user">
                        文章作者:
                    </i>
                </span>
                <span class="reprint-info">
                    <a href="/about" rel="external nofollow noreferrer">不二</a>
                </span>
            </div>
            <div class="reprint__type">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-link">
                        文章链接:
                    </i>
                </span>
                <span class="reprint-info">
                    <a href="http://buerlog.top/2019/12/12/jing-yan-zong-jie/manjaro-an-zhuang-ji-qi-pei-zhi/">http://buerlog.top/2019/12/12/jing-yan-zong-jie/manjaro-an-zhuang-ji-qi-pei-zhi/</a>
                </span>
            </div>
            <div class="reprint__notice">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-copyright">
                        版权声明:
                    </i>
                </span>
                <span class="reprint-info">
                    本博客所有文章除特別声明外，均采用
                    <a href="https://creativecommons.org/licenses/by/4.0/deed.zh" rel="external nofollow noreferrer" target="_blank">CC BY 4.0</a>
                    许可协议。转载请注明来源
                    <a href="/about" target="_blank">不二</a>
                    !
                </span>
            </div>
        
    </div>

    <script async defer>
      document.addEventListener("copy", function (e) {
        let toastHTML = '<span>复制成功，请遵循本文的转载规则</span><button class="btn-flat toast-action" onclick="navToReprintStatement()" style="font-size: smaller">查看</a>';
        M.toast({html: toastHTML})
      });

      function navToReprintStatement() {
        $("html, body").animate({scrollTop: $("#reprint-statement").offset().top - 80}, 800);
      }
    </script>



            <div class="tag_share" style="display: block;">
                <div class="post-meta__tag-list" style="display: inline-block;">
                    
                        <div class="article-tag">
                            
                                <a href="/tags/%E8%A3%85%E6%9C%BA/">
                                    <span class="chip bg-color">装机</span>
                                </a>
                            
                                <a href="/tags/Ranger/">
                                    <span class="chip bg-color">Ranger</span>
                                </a>
                            
                                <a href="/tags/Manjaro/">
                                    <span class="chip bg-color">Manjaro</span>
                                </a>
                            
                        </div>
                    
                </div>
                <div class="post_share" style="zoom: 80%; width: fit-content; display: inline-block; float: right; margin: -0.15rem 0;">
                    <link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/share/css/share.min.css">
<div id="article-share">

    
    <div class="social-share" data-sites="twitter,facebook,google,qq,qzone,wechat,weibo,douban,linkedin" data-wechat-qrcode-helper="<p>微信扫一扫即可分享！</p>"></div>
    <script src="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/share/js/social-share.min.js"></script>
    

    

</div>

                </div>
            </div>
            
                <style>
    #reward {
        margin: 40px 0;
        text-align: center;
    }

    #reward .reward-link {
        font-size: 1.4rem;
        line-height: 38px;
    }

    #reward .btn-floating:hover {
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2), 0 5px 15px rgba(0, 0, 0, 0.2);
    }

    #rewardModal {
        width: 320px;
        height: 350px;
    }

    #rewardModal .reward-title {
        margin: 15px auto;
        padding-bottom: 5px;
    }

    #rewardModal .modal-content {
        padding: 10px;
    }

    #rewardModal .close {
        position: absolute;
        right: 15px;
        top: 15px;
        color: rgba(0, 0, 0, 0.5);
        font-size: 1.3rem;
        line-height: 20px;
        cursor: pointer;
    }

    #rewardModal .close:hover {
        color: #ef5350;
        transform: scale(1.3);
        -moz-transform:scale(1.3);
        -webkit-transform:scale(1.3);
        -o-transform:scale(1.3);
    }

    #rewardModal .reward-tabs {
        margin: 0 auto;
        width: 210px;
    }

    .reward-tabs .tabs {
        height: 38px;
        margin: 10px auto;
        padding-left: 0;
    }

    .reward-content ul {
        padding-left: 0 !important;
    }

    .reward-tabs .tabs .tab {
        height: 38px;
        line-height: 38px;
    }

    .reward-tabs .tab a {
        color: #fff;
        background-color: #ccc;
    }

    .reward-tabs .tab a:hover {
        background-color: #ccc;
        color: #fff;
    }

    .reward-tabs .wechat-tab .active {
        color: #fff !important;
        background-color: #22AB38 !important;
    }

    .reward-tabs .alipay-tab .active {
        color: #fff !important;
        background-color: #019FE8 !important;
    }

    .reward-tabs .reward-img {
        width: 210px;
        height: 210px;
    }
</style>

<div id="reward">
    <a href="#rewardModal" class="reward-link modal-trigger btn-floating btn-medium waves-effect waves-light red">赏</a>

    <!-- Modal Structure -->
    <div id="rewardModal" class="modal">
        <div class="modal-content">
            <a class="close modal-close"><i class="fas fa-times"></i></a>
            <h4 class="reward-title">你的赏识是我前进的动力</h4>
            <div class="reward-content">
                <div class="reward-tabs">
                    <ul class="tabs row">
                        <li class="tab col s6 alipay-tab waves-effect waves-light"><a href="#alipay">支付宝</a></li>
                        <li class="tab col s6 wechat-tab waves-effect waves-light"><a href="#wechat">微 信</a></li>
                    </ul>
                    <div id="alipay">
                        <img src="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/medias/reward/alipay.jpg" class="reward-img" alt="支付宝打赏二维码">
                    </div>
                    <div id="wechat">
                        <img src="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/medias/reward/wechat.png" class="reward-img" alt="微信打赏二维码">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    $(function () {
        $('.tabs').tabs();
    });
</script>

            
        </div>
    </div>

    

    

    

    

    

    

    

    

    

<article id="prenext-posts" class="prev-next articles">
    <div class="row article-row">
        
        <div class="article col s12 m6" data-aos="fade-up">
            <div class="article-badge left-badge text-color">
                <i class="fas fa-chevron-left"></i>&nbsp;上一篇</div>
            <div class="card">
                <a href="/2019/12/22/yun-ji-suan/shen-ru-qian-chu-docker-bi-ji/">
                    <div class="card-image">
                        
                        <img src="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@src/source/_posts/PageImg/云计算/docker.jpeg" class="responsive-img" alt="深入浅出Docker笔记">
                        
                        <span class="card-title">深入浅出Docker笔记</span>
                    </div>
                </a>
                <div class="card-content article-content">
                    <div class="summary block-with-text">
                        
                            
                        
                    </div>
                    <div class="publish-info">
                        <span class="publish-date">
                            <i class="far fa-clock fa-fw icon-date"></i>2019-12-22
                        </span>
                        <span class="publish-author">
                            
                            <i class="fas fa-bookmark fa-fw icon-category"></i>
                            
                            <a href="/categories/%E4%BA%91%E8%AE%A1%E7%AE%97/" class="post-category">
                                    云计算
                                </a>
                            
                            
                        </span>
                    </div>
                </div>
                
                <div class="card-action article-tags">
                    
                    <a href="/tags/Docker/">
                        <span class="chip bg-color">Docker</span>
                    </a>
                    
                    <a href="/tags/Book/">
                        <span class="chip bg-color">Book</span>
                    </a>
                    
                </div>
                
            </div>
        </div>
        
        
        <div class="article col s12 m6" data-aos="fade-up">
            <div class="article-badge right-badge text-color">
                下一篇&nbsp;<i class="fas fa-chevron-right"></i>
            </div>
            <div class="card">
                <a href="/2019/12/08/jing-yan-zong-jie/centos7-chu-shi-hua-an-zhuang-bu-zou/">
                    <div class="card-image">
                        
                        <img src="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@src/source/_posts/PageImg/经验总结/centos.png" class="responsive-img" alt="CentOS7初始化安装步骤">
                        
                        <span class="card-title">CentOS7初始化安装步骤</span>
                    </div>
                </a>
                <div class="card-content article-content">
                    <div class="summary block-with-text">
                        
                            
                        
                    </div>
                    <div class="publish-info">
                            <span class="publish-date">
                                <i class="far fa-clock fa-fw icon-date"></i>2019-12-08
                            </span>
                        <span class="publish-author">
                            
                            <i class="fas fa-bookmark fa-fw icon-category"></i>
                            
                            <a href="/categories/%E7%BB%8F%E9%AA%8C%E6%80%BB%E7%BB%93/" class="post-category">
                                    经验总结
                                </a>
                            
                            
                        </span>
                    </div>
                </div>
                
                <div class="card-action article-tags">
                    
                    <a href="/tags/Python/">
                        <span class="chip bg-color">Python</span>
                    </a>
                    
                    <a href="/tags/Linux/">
                        <span class="chip bg-color">Linux</span>
                    </a>
                    
                    <a href="/tags/CentOS/">
                        <span class="chip bg-color">CentOS</span>
                    </a>
                    
                </div>
                
            </div>
        </div>
        
    </div>
</article>

</div>


<script>
    $('#articleContent').on('copy', function (e) {
        // IE8 or earlier browser is 'undefined'
        if (typeof window.getSelection === 'undefined') return;

        var selection = window.getSelection();
        // if the selection is short let's not annoy our users.
        if (('' + selection).length < Number.parseInt('120')) {
            return;
        }

        // create a div outside of the visible area and fill it with the selected text.
        var bodyElement = document.getElementsByTagName('body')[0];
        var newdiv = document.createElement('div');
        newdiv.style.position = 'absolute';
        newdiv.style.left = '-99999px';
        bodyElement.appendChild(newdiv);
        newdiv.appendChild(selection.getRangeAt(0).cloneContents());

        // we need a <pre> tag workaround.
        // otherwise the text inside "pre" loses all the line breaks!
        if (selection.getRangeAt(0).commonAncestorContainer.nodeName === 'PRE') {
            newdiv.innerHTML = "<pre>" + newdiv.innerHTML + "</pre>";
        }

        var url = document.location.href;
        newdiv.innerHTML += '<br />'
            + '来源: 不二博客<br />'
            + '文章作者: 不二<br />'
            + '文章链接: <a href="' + url + '">' + url + '</a><br />'
            + '本文章著作权归作者所有，任何形式的转载都请注明出处。';

        selection.selectAllChildren(newdiv);
        window.setTimeout(function () {bodyElement.removeChild(newdiv);}, 200);
    });
</script>


<!-- 代码块功能依赖 -->
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/codeBlock/codeBlockFuction.js"></script>

<!-- 代码语言 -->

<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/codeBlock/codeLang.js"></script>


<!-- 代码块复制 -->

<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/codeBlock/codeCopy.js"></script>


<!-- 代码块收缩 -->

<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/codeBlock/codeShrink.js"></script>


    </div>
    <div id="toc-aside" class="expanded col l3 hide-on-med-and-down">
        <div class="toc-widget card" style="background-color: white;">
            <div class="toc-title"><i class="far fa-list-alt"></i>&nbsp;&nbsp;目录</div>
            <div id="toc-content"></div>
        </div>
    </div>
</div>

<!-- TOC 悬浮按钮. -->

<div id="floating-toc-btn" class="hide-on-med-and-down">
    <a class="btn-floating btn-large bg-color">
        <i class="fas fa-list-ul"></i>
    </a>
</div>


<script src="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/tocbot/tocbot.min.js"></script>
<script>
    $(function () {
        tocbot.init({
            tocSelector: '#toc-content',
            contentSelector: '#articleContent',
            headingsOffset: -($(window).height() * 0.4 - 45),
            collapseDepth: Number('0'),
            headingSelector: 'h2, h3, h4, h5, h6'
        });

        // modify the toc link href to support Chinese.
        let i = 0;
        let tocHeading = 'toc-heading-';
        $('#toc-content a').each(function () {
            $(this).attr('href', '#' + tocHeading + (++i));
        });

        // modify the heading title id to support Chinese.
        i = 0;
        $('#articleContent').children('h2, h3, h4, h5, h6').each(function () {
            $(this).attr('id', tocHeading + (++i));
        });

        // Set scroll toc fixed.
        let tocHeight = parseInt($(window).height() * 0.4 - 64);
        let $tocWidget = $('.toc-widget');
        $(window).scroll(function () {
            let scroll = $(window).scrollTop();
            /* add post toc fixed. */
            if (scroll > tocHeight) {
                $tocWidget.addClass('toc-fixed');
            } else {
                $tocWidget.removeClass('toc-fixed');
            }
        });

        
        /* 修复文章卡片 div 的宽度. */
        let fixPostCardWidth = function (srcId, targetId) {
            let srcDiv = $('#' + srcId);
            if (srcDiv.length === 0) {
                return;
            }

            let w = srcDiv.width();
            if (w >= 450) {
                w = w + 21;
            } else if (w >= 350 && w < 450) {
                w = w + 18;
            } else if (w >= 300 && w < 350) {
                w = w + 16;
            } else {
                w = w + 14;
            }
            $('#' + targetId).width(w);
        };

        // 切换TOC目录展开收缩的相关操作.
        const expandedClass = 'expanded';
        let $tocAside = $('#toc-aside');
        let $mainContent = $('#main-content');
        $('#floating-toc-btn .btn-floating').click(function () {
            if ($tocAside.hasClass(expandedClass)) {
                $tocAside.removeClass(expandedClass).hide();
                $mainContent.removeClass('l9');
            } else {
                $tocAside.addClass(expandedClass).show();
                $mainContent.addClass('l9');
            }
            fixPostCardWidth('artDetail', 'prenext-posts');
        });
        
    });
</script>

    

</main>




    <footer class="page-footer bg-color">
    
        <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/aplayer/APlayer.min.css">
<style>
    .aplayer .aplayer-lrc p {
        
        display: none;
        
        font-size: 12px;
        font-weight: 700;
        line-height: 16px !important;
    }

    .aplayer .aplayer-lrc p.aplayer-lrc-current {
        
        display: none;
        
        font-size: 15px;
        color: #42b983;
    }

    
    .aplayer.aplayer-fixed.aplayer-narrow .aplayer-body {
        left: -66px !important;
    }

    .aplayer.aplayer-fixed.aplayer-narrow .aplayer-body:hover {
        left: 0px !important;
    }

    
</style>
<div class="">
    
    <div class="row">
        <meting-js class="col l8 offset-l2 m10 offset-m1 s12"
                   server="netease"
                   type="song"
                   id="1901371647"
                   fixed='true'
                   autoplay='false'
                   theme='#42b983'
                   loop='all'
                   order='random'
                   preload='auto'
                   volume='0.7'
                   list-folded='true'
        >
        </meting-js>
    </div>
</div>

<script src="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/aplayer/APlayer.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/meting@2/dist/Meting.min.js"></script>

    
    <div class="container row center-align" style="margin-bottom: 15px !important;">
        <div class="col s12 m8 l8 copy-right">
            Copyright&nbsp;&copy;
            
                <span id="year">2018-2023</span>
            
            <span id="year">2018</span>
            <a href="/about" target="_blank">不二</a>
            |&nbsp;Powered by&nbsp;<a href="https://hexo.io/" target="_blank">Hexo</a>
            |&nbsp;Theme&nbsp;<a href="https://github.com/blinkfox/hexo-theme-matery" target="_blank">Matery</a>
            <br>
            
            &nbsp;<i class="fas fa-chart-area"></i>&nbsp;站点总字数:&nbsp;<span
                class="white-color">263.4k</span>&nbsp;字
            
            
            
            
            
            
            <span id="busuanzi_container_site_pv">
                |&nbsp;<i class="far fa-eye"></i>&nbsp;总访问量:&nbsp;<span id="busuanzi_value_site_pv"
                    class="white-color"></span>&nbsp;次
            </span>
            
            
            <span id="busuanzi_container_site_uv">
                |&nbsp;<i class="fas fa-users"></i>&nbsp;总访问人数:&nbsp;<span id="busuanzi_value_site_uv"
                    class="white-color"></span>&nbsp;人
            </span>
            
            <br>
            
            <span id="sitetime">载入运行时间...</span>
            <script>
                function siteTime() {
                    var seconds = 1000;
                    var minutes = seconds * 60;
                    var hours = minutes * 60;
                    var days = hours * 24;
                    var years = days * 365;
                    var today = new Date();
                    var startYear = "2018";
                    var startMonth = "5";
                    var startDate = "25";
                    var startHour = "17";
                    var startMinute = "20";
                    var startSecond = "53";
                    var todayYear = today.getFullYear();
                    var todayMonth = today.getMonth() + 1;
                    var todayDate = today.getDate();
                    var todayHour = today.getHours();
                    var todayMinute = today.getMinutes();
                    var todaySecond = today.getSeconds();
                    var t1 = Date.UTC(startYear, startMonth, startDate, startHour, startMinute, startSecond);
                    var t2 = Date.UTC(todayYear, todayMonth, todayDate, todayHour, todayMinute, todaySecond);
                    var diff = t2 - t1;
                    var diffYears = Math.floor(diff / years);
                    var diffDays = Math.floor((diff / days) - diffYears * 365);
                    var diffHours = Math.floor((diff - (diffYears * 365 + diffDays) * days) / hours);
                    var diffMinutes = Math.floor((diff - (diffYears * 365 + diffDays) * days - diffHours * hours) /
                        minutes);
                    var diffSeconds = Math.floor((diff - (diffYears * 365 + diffDays) * days - diffHours * hours -
                        diffMinutes * minutes) / seconds);
                    if (startYear == todayYear) {
                        document.getElementById("year").innerHTML = todayYear;
                        document.getElementById("sitetime").innerHTML = "本站已安全运行 " + diffDays + " 天 " + diffHours +
                            " 小时 " + diffMinutes + " 分钟 " + diffSeconds + " 秒";
                    } else {
                        document.getElementById("year").innerHTML = startYear + " - " + todayYear;
                        document.getElementById("sitetime").innerHTML = "本站已安全运行 " + diffYears + " 年 " + diffDays +
                            " 天 " + diffHours + " 小时 " + diffMinutes + " 分钟 " + diffSeconds + " 秒";
                    }
                }
                setInterval(siteTime, 1000);
            </script>
            
            <br>
            
        </div>
        <div class="col s12 m4 l4 social-link social-statis">
    <a href="https://github.com/weiyouwozuiku" class="tooltipped" target="_blank" data-tooltip="访问我的GitHub" data-position="top" data-delay="50">
        <i class="fab fa-github"></i>
    </a>



    <a href="mailto:weiyouwozuiku@gmail.com" class="tooltipped" target="_blank" data-tooltip="邮件联系我" data-position="top" data-delay="50">
        <i class="fas fa-envelope-open"></i>
    </a>







    <a href="tencent://AddContact/?fromId=50&fromSubId=1&subcmd=all&uin=1104891151" class="tooltipped" target="_blank" data-tooltip="QQ联系我: 1104891151" data-position="top" data-delay="50">
        <i class="fab fa-qq"></i>
    </a>





    <a href="https://www.zhihu.com/people/he-he-9-35-47" class="tooltipped" target="_blank" data-tooltip="关注我的知乎: https://www.zhihu.com/people/he-he-9-35-47" data-position="top" data-delay="50">
        <i class="fab fa-zhihu1">知</i>
    </a>



    <a href="/atom.xml" class="tooltipped" target="_blank" data-tooltip="RSS 订阅" data-position="top" data-delay="50">
        <i class="fas fa-rss"></i>
    </a>

</div>
    </div>
</footer>

<div class="progress-bar"></div>

    <script src='https://unpkg.com/mermaid@8.14.0/dist/mermaid.min.js'></script>
    <script>
      if (window.mermaid) {
        mermaid.initialize({theme: 'forest'});
      }
    </script>
  

    <!-- 搜索遮罩框 -->
<div id="searchModal" class="modal">
    <div class="modal-content">
        <div class="search-header">
            <span class="title"><i class="fas fa-search"></i>&nbsp;&nbsp;搜索</span>
            <input type="search" id="searchInput" name="s" placeholder="请输入搜索的关键字"
                   class="search-input">
        </div>
        <div id="searchResult"></div>
    </div>
</div>

<script type="text/javascript">
$(function () {
    var searchFunc = function (path, search_id, content_id) {
        'use strict';
        $.ajax({
            url: path,
            dataType: "xml",
            success: function (xmlResponse) {
                // get the contents from search data
                var datas = $("entry", xmlResponse).map(function () {
                    return {
                        title: $("title", this).text(),
                        content: $("content", this).text(),
                        url: $("url", this).text()
                    };
                }).get();
                var $input = document.getElementById(search_id);
                var $resultContent = document.getElementById(content_id);
                $input.addEventListener('input', function () {
                    var str = '<ul class=\"search-result-list\">';
                    var keywords = this.value.trim().toLowerCase().split(/[\s\-]+/);
                    $resultContent.innerHTML = "";
                    if (this.value.trim().length <= 0) {
                        return;
                    }
                    // perform local searching
                    datas.forEach(function (data) {
                        var isMatch = true;
                        var data_title = data.title.trim().toLowerCase();
                        var data_content = data.content.trim().replace(/<[^>]+>/g, "").toLowerCase();
                        var data_url = data.url;
                        data_url = data_url.indexOf('/') === 0 ? data.url : '/' + data_url;
                        var index_title = -1;
                        var index_content = -1;
                        var first_occur = -1;
                        // only match artiles with not empty titles and contents
                        if (data_title !== '' && data_content !== '') {
                            keywords.forEach(function (keyword, i) {
                                index_title = data_title.indexOf(keyword);
                                index_content = data_content.indexOf(keyword);
                                if (index_title < 0 && index_content < 0) {
                                    isMatch = false;
                                } else {
                                    if (index_content < 0) {
                                        index_content = 0;
                                    }
                                    if (i === 0) {
                                        first_occur = index_content;
                                    }
                                }
                            });
                        }
                        // show search results
                        if (isMatch) {
                            str += "<li><a href='" + data_url + "' class='search-result-title'>" + data_title + "</a>";
                            var content = data.content.trim().replace(/<[^>]+>/g, "");
                            if (first_occur >= 0) {
                                // cut out 100 characters
                                var start = first_occur - 20;
                                var end = first_occur + 80;
                                if (start < 0) {
                                    start = 0;
                                }
                                if (start === 0) {
                                    end = 100;
                                }
                                if (end > content.length) {
                                    end = content.length;
                                }
                                var match_content = content.substr(start, end);
                                // highlight all keywords
                                keywords.forEach(function (keyword) {
                                    var regS = new RegExp(keyword, "gi");
                                    match_content = match_content.replace(regS, "<em class=\"search-keyword\">" + keyword + "</em>");
                                });

                                str += "<p class=\"search-result\">" + match_content + "...</p>"
                            }
                            str += "</li>";
                        }
                    });
                    str += "</ul>";
                    $resultContent.innerHTML = str;
                });
            }
        });
    };

    searchFunc('/search.xml', 'searchInput', 'searchResult');
});
</script>

    <!-- 回到顶部按钮 -->
<div id="backTop" class="top-scroll">
    <a class="btn-floating btn-large waves-effect waves-light" href="#!">
        <i class="fas fa-arrow-up"></i>
    </a>
</div>


    <script src="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/materialize/materialize.min.js"></script>
    <script src="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/masonry/masonry.pkgd.min.js"></script>
    <script src="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/aos/aos.js"></script>
    <script src="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/scrollprogress/scrollProgress.min.js"></script>
    <script src="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/lightGallery/js/lightgallery-all.min.js"></script>
    <script src="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/js/matery.js"></script>

    <!-- Baidu Analytics -->

<script>
    var _hmt = _hmt || [];
    (function () {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?943a68f473d421f2d98228f74edc63d0";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>

    <!-- Baidu Push -->

<script>
    (function () {
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
            bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        } else {
            bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
    })();
</script>

    
    
    <script async src="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/others/busuanzi.pure.mini.js"></script>
    

    

    

    <!--腾讯兔小巢-->
    
    
    <script type="text/javascript" color="0,0,255"
        pointColor="0,0,255" opacity='0.7'
        zIndex="-1" count="150"
        src="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/background/canvas-nest.js"></script>
    

    
    
    <script type="text/javascript" size="150" alpha='0.6'
        zIndex="-1" src="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/background/ribbon-refresh.min.js" async="async"></script>
    

    
    <script type="text/javascript" src="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/background/ribbon-dynamic.js" async="async"></script>
    

    
    <script src="https://cdn.jsdelivr.net/gh/weiyouwozuiku/weiyouwozuiku.github.io@master/libs/instantpage/instantpage.js" type="module"></script>
    

</body>

</html>
